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

Function entity

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

Source from the content-addressed store, hash-verified

4import { assert, describe, it } from "@effect/vitest"
5
6const entity = (
7 module: string,
8 name: string,
9 declaration: DeclarationModel,
10 hash: string
11): ApiEntity => ({
12 id: `${module}#${name}#value`,
13 packageName: module.split("/")[0]!,
14 module,
15 path: [name],
16 bucket: "value",
17 declarationKind: declaration.kind,
18 importRoutes: [{ module, path: [name] }],
19 declarations: [declaration],
20 displaySignature: `declare const ${name}: unknown`,
21 fingerprint: hash,
22 documentation: { stability: "stable" },
23 source: { file: `${name}.d.ts`, line: 1, column: 1 }
24})
25
26const snapshot = (ref: string, entities: ReadonlyArray<ApiEntity>): ApiSnapshot => ({
27 version: 1,

Callers 1

Diff.test.tsFile · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected