(value: unknown, parent?: string)
| 606 | |
| 607 | const fingerprintDeclarations = (declarations: ReadonlyArray<DeclarationModel>): string => { |
| 608 | const normalize = (value: unknown, parent?: string): unknown => { |
| 609 | if (Array.isArray(value)) { |
| 610 | return value.map((entry) => normalize(entry, parent)) |
| 611 | } |
| 612 | if (value !== null && typeof value === "object") { |
| 613 | const input = value as Record<string, unknown> |
| 614 | return Object.fromEntries( |
| 615 | Object.entries(input).flatMap(([key, entry]) => { |
| 616 | if ((parent === "parameters" && key === "name") || key === "displayName") { |
| 617 | return [] |
| 618 | } |
| 619 | return [[key, normalize(entry, key)]] |
| 620 | }) |
| 621 | ) |
| 622 | } |
| 623 | return value |
| 624 | } |
| 625 | return fingerprint( |
| 626 | declarations.map((declaration) => ({ |
| 627 | ...declaration, |
no test coverage detected