(x: T | undefined | null, message?: string, ...extra_info: any[])
| 73 | } |
| 74 | |
| 75 | export function unwrap<T>(x: T | undefined | null, message?: string, ...extra_info: any[]): T { |
| 76 | if (x === undefined || x === null) { |
| 77 | fail('Unwrap failed', message, extra_info); |
| 78 | } |
| 79 | return x; |
| 80 | } |
| 81 | |
| 82 | // This mainly a utility for JQuery.val(): string | number | string[] | undefined, in our code we typically want a |
| 83 | // single string. |
no test coverage detected