(x: unknown)
| 244 | } |
| 245 | |
| 246 | function asMap(x: unknown): Map<string, unknown> { |
| 247 | if (x instanceof Map) { |
| 248 | return x as Map<string, unknown>; |
| 249 | } |
| 250 | throw new Error('Map expected, but got ' + typeof x); |
| 251 | } |
| 252 | |
| 253 | function asNumber(x: unknown): number { |
| 254 | if (typeof x === 'number') { |