(x: unknown)
| 237 | // Type assertions and conversions for CBOR-decoded objects. |
| 238 | |
| 239 | function asArray(x: unknown): unknown[] { |
| 240 | if (x instanceof Array) { |
| 241 | return x; |
| 242 | } |
| 243 | throw new Error('Array expected, but got ' + typeof x); |
| 244 | } |
| 245 | |
| 246 | function asMap(x: unknown): Map<string, unknown> { |
| 247 | if (x instanceof Map) { |
no outgoing calls
no test coverage detected