(document: Document)
| 10 | type VariableDecl = { id: string; default?: unknown; [key: string]: unknown }; |
| 11 | |
| 12 | function getHtmlEl(document: Document): Element | null { |
| 13 | return (document as Document & { documentElement?: Element }).documentElement ?? null; |
| 14 | } |
| 15 | |
| 16 | /** Parse the variable declaration array, or null when absent/invalid. */ |
| 17 | function readDecls(document: Document): { htmlEl: Element; arr: VariableDecl[] } | null { |