-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
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[];
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue