(value: unknown, parent?: string)
| 590 | |
| 591 | const fingerprintDeclarations = (declarations: ReadonlyArray<DeclarationModel>): string => { |
| 592 | const normalize = (value: unknown, parent?: string): unknown => { |
| 593 | if (Array.isArray(value)) { |
| 594 | return value.map((entry) => normalize(entry, parent)) |
| 595 | } |
| 596 | if (value !== null && typeof value === "object") { |
| 597 | const input = value as Record<string, unknown> |
| 598 | return Object.fromEntries( |
| 599 | Object.entries(input).flatMap(([key, entry]) => { |
| 600 | if ((parent === "parameters" && key === "name") || key === "displayName") { |
| 601 | return [] |
| 602 | } |
| 603 | return [[key, normalize(entry, key)]] |
| 604 | }) |
| 605 | ) |
| 606 | } |
| 607 | return value |
| 608 | } |
| 609 | return fingerprint( |
| 610 | declarations.map((declaration) => ({ |
| 611 | ...declaration, |
no test coverage detected