Closed
Description
TypeScript Version: 2.4.1
Code: Object.keys(undefined)
(Object.getOwnPropertyNames
and similar have the same issue.)
Expected behavior:
With strictNullChecks enabled it should result in an error (same as running the code as JavaScript).
Actual behavior:
It compiles without errors.
Possible solution:
In lib.*.d.ts replace keys(o: any): string[];
by keys(o: {}): string[];