Reenable strict null checks (#6716)

* add some patches for strict null

* renable strict null checks
This commit is contained in:
Anthony Dresser
2019-08-13 14:33:08 -07:00
committed by GitHub
parent 60bf331f19
commit 7008e88678
9 changed files with 35 additions and 24 deletions

View File

@@ -297,7 +297,7 @@ function topStep<T>(array: ReadonlyArray<T>, compare: (a: T, b: T) => number, re
*/
export function coalesce<T>(array: ReadonlyArray<T | undefined | null>): T[] {
if (!array) {
return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-checks
return array as T[]; // {{SQL CARBON EDIT}} @anthonydresser strict-null-checks
}
return <T[]>array.filter(e => !!e);
}