mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 11:40:49 +00:00
Add note
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* 値が null または undefined の場合はエラーを発生させ、そうでない場合は値をそのまま返します
|
||||
*/
|
||||
export function ensure<T>(x: T): NonNullable<T> {
|
||||
if (x == null) {
|
||||
throw 'ぬるぽ';
|
||||
|
||||
Reference in New Issue
Block a user