mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-16 22:39:00 +01:00
64953fadc9
* `Array.prototype.filter`での非null確認では`isNotNull`関数を使うように * `{}` -> `NonNullable<unknown>`
8 lines
230 B
TypeScript
8 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;
|
|
}
|