| 4 | import { assert, describe, it } from "@effect/vitest" |
| 5 | |
| 6 | const 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 | |
| 26 | const snapshot = (ref: string, entities: ReadonlyArray<ApiEntity>): ApiSnapshot => ({ |
| 27 | version: 1, |