Better error handling
This commit is contained in:
parent
b390363b25
commit
e3b3f8fac1
25 changed files with 52 additions and 52 deletions
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
export function ensure<T>(x: T): NonNullable<T> {
|
||||
if (x == null) {
|
||||
throw 'ぬるぽ';
|
||||
throw new Error('ぬるぽ');
|
||||
} else {
|
||||
return x!;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue