(unit: unknown)
| 56 | unit === "" ? "empty" : printUnit(unit) |
| 57 | |
| 58 | const serializeUnit = (unit: unknown): JsonPrimitive => { |
| 59 | const time = dateTimeOf(unit) |
| 60 | return ( |
| 61 | time !== undefined ? |
| 62 | Number.isNaN(time) ? |
| 63 | "Invalid Date" |
| 64 | : (unit as Date).toISOString() |
| 65 | : hasDomain(unit, "object") || typeof unit === "symbol" ? |
| 66 | registeredReference(unit) |
| 67 | : (defaultValueSerializer(unit) as JsonPrimitive) |
| 68 | ) |
| 69 | } |
| 70 | |
| 71 | const implementation: nodeImplementationOf<Unit.Declaration> = |
| 72 | implementNode<Unit.Declaration>({ |
no test coverage detected