MCPcopy Create free account
hub / github.com/Effect-TS/effect / entity

Function entity

packages/tools/api-diff/test/Diff.test.ts:14–32  ·  view source on GitHub ↗
(
  module: string,
  name: string,
  declaration: DeclarationModel,
  hash: string
)

Source from the content-addressed store, hash-verified

12const MainLayer = Snapshotter.layer.pipe(Layer.provideMerge(NodeServices.layer))
13
14const entity = (
15 module: string,
16 name: string,
17 declaration: DeclarationModel,
18 hash: string
19): ApiEntity => ({
20 id: `${module}#${name}#value`,
21 packageName: module.split("/")[0]!,
22 module,
23 path: [name],
24 bucket: "value",
25 declarationKind: declaration.kind,
26 importRoutes: [{ module, path: [name] }],
27 declarations: [declaration],
28 displaySignature: `declare const ${name}: unknown`,
29 fingerprint: hash,
30 documentation: { stability: "stable" },
31 source: { file: `${name}.d.ts`, line: 1, column: 1 }
32})
33
34const snapshot = (ref: string, entities: ReadonlyArray<ApiEntity>): ApiSnapshot => ({
35 version: 1,

Callers 1

Diff.test.tsFile · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected