Better error handling
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
export function ensure<T>(x: T): NonNullable<T> {
|
||||
if (x == null) {
|
||||
throw 'ぬるぽ';
|
||||
throw new Error('ぬるぽ');
|
||||
} else {
|
||||
return x!;
|
||||
}
|
||||
|
Reference in New Issue
Block a user