(value: T | null | undefined)
| 1 | import GLib from 'gi://GLib'; |
| 2 | |
| 3 | export function assertNotNull<T>(value: T | null | undefined): T { |
| 4 | if (value === null || value === undefined) { |
| 5 | throw Error(`Expected value, but found ${value}`); |
| 6 | } |
| 7 | return value; |
| 8 | } |
| 9 | |
| 10 | export function assert( |
| 11 | shouldBeTrue: boolean, |
no test coverage detected