refactor(backend): Array.prototype.filter
での非null確認ではisNotNull
関数を使うように (#13442)
* `Array.prototype.filter`での非null確認では`isNotNull`関数を使うように * `{}` -> `NonNullable<unknown>`
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
// we are using {} as "any non-nullish value" as expected
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function isNotNull<T extends {}>(input: T | undefined | null): input is T {
|
||||
export function isNotNull<T extends NonNullable<unknown>>(input: T | undefined | null): input is T {
|
||||
return input != null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user