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.
Is there an event type for the HTMLInputElement change event? Currently is automatically resolved as general
Event>EventTarget. Which has nofilesproperty. seeFileList.https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement
Example:
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.