mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-03 23:49:20 +09:00
64953fadc9
* `Array.prototype.filter`での非null確認では`isNotNull`関数を使うように * `{}` -> `NonNullable<unknown>`
9 lines
230 B
TypeScript
9 lines
230 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
export function isNotNull<T extends NonNullable<unknown>>(input: T | undefined | null): input is T {
|
|
return input != null;
|
|
}
|