(b: boolean, message: string = "")
| 2 | // Copied from toplevel util.ts |
| 3 | |
| 4 | export function assert(b: boolean, message: string = ""): asserts b { |
| 5 | if (!b) { |
| 6 | console.error(new Error().stack); |
| 7 | throw new Error(`Assert fail: ${message}`); |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | export function assertExists<T>(v: T | null | undefined): T { |
| 12 | if (v !== undefined && v !== null) |
no outgoing calls
no test coverage detected