-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Closed
Copy link
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 TypeScript
Milestone
Description
Is there an event type for the HTMLInputElement change event? Currently is automatically resolved as general Event
> EventTarget
. Which has no files
property. see FileList
.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement
Example:
const fileInput = document.createElement('input');
fileInput.type = 'file';
fileInput.addEventListener('change', (event: Event) => {
handleFileLoad(event.target.files); // Error: files does not exist on EventTarget.
});
document.body.appendChild(this.fileInput);
tsconfig.json (typescript 3.4.5):
{
"compilerOptions": {
"outDir": "./dist/",
"noImplicitAny": true,
"sourceMap": true,
"module": "esnext",
"target": "es5",
"moduleResolution": "node",
"strict": true
},
"exclude": ["node_modules", "dist"]
}
If not, this is a feature request. :) e.g.
inad9300, mcoevert, eneoli, rohitagrawalla, scriptex and 68 more
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 TypeScript