Chore: improve typings
This commit is contained in:
parent
57a531f292
commit
dd46bfdf3b
1 changed files with 3 additions and 0 deletions
|
@ -263,6 +263,9 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static NoNull<T>(array: T[] | undefined): (T[] | undefined)
|
||||||
|
public static NoNull<T>(array: undefined): undefined
|
||||||
|
public static NoNull<T>(array: T[]): T[]
|
||||||
public static NoNull<T>(array: T[]): NonNullable<T>[] {
|
public static NoNull<T>(array: T[]): NonNullable<T>[] {
|
||||||
return <any>array?.filter((o) => o !== undefined && o !== null)
|
return <any>array?.filter((o) => o !== undefined && o !== null)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue