-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
microsoft/TypeScript-DOM-lib-generator
#159Labels
Domain: 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 issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
TypeScript Version: 2.0.3
Code
tsconfig.json includes lib es6
:
{
"compilerOptions": {
"lib": [
"es6",
"dom"
]
},
}
function eventHandler() {
// typescript doesn't complain about missing event variable, because event is declared as global in lib.es6.d.ts
console.log(event.target);
}
Expected behavior:
Don't expect event to exist on the global object. Couldn't reproduce it in Safari, Firefox or Chrome. It's always console.log(window.event); // undefined
Actual behavior:
event: Event
is declared as global variable in lib.es6.d.ts
https://github.com/Microsoft/TypeScript/blob/2e7c83abc833534181d97c534bfac865cd93b1f0/lib/lib.es6.d.ts#L18680
https://github.com/Microsoft/TypeScript/blob/2e7c83abc833534181d97c534bfac865cd93b1f0/lib/lib.es6.d.ts#L20129
Metadata
Metadata
Assignees
Labels
Domain: 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 issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript