This commit is contained in:
syuilo 2019-04-13 14:45:51 +09:00
parent 084135141f
commit 78414dee29
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,6 @@
/**
* null undefined
*/
export function ensure<T>(x: T): NonNullable<T> {
if (x == null) {
throw 'ぬるぽ';