mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 01:50:45 +01:00
Add note
This commit is contained in:
parent
084135141f
commit
78414dee29
1 changed files with 3 additions and 0 deletions
|
@ -1,3 +1,6 @@
|
|||
/**
|
||||
* 値が null または undefined の場合はエラーを発生させ、そうでない場合は値をそのまま返します
|
||||
*/
|
||||
export function ensure<T>(x: T): NonNullable<T> {
|
||||
if (x == null) {
|
||||
throw 'ぬるぽ';
|
||||
|
|
Loading…
Reference in a new issue