hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | /** |
| 2 | * The one record guard for payloads whose shape is only known at runtime — |
| 3 | * ZEKA's insight JSON is stored and served unread, so every reader narrows it |
| 4 | * field by field. Keep this canonical: a guard redefined per file drifts. |
| 5 | */ |
| 6 | export type UnknownRecord = Record<string, unknown>; |
| 7 | |
| 8 | export function isRecord(value: unknown): value is UnknownRecord { |
| 9 | return typeof value === "object" && value !== null && !Array.isArray(value); |
| 10 | } |