Add HTMLFileInputElement and update HTMLInputElement.#74
Add HTMLFileInputElement and update HTMLInputElement.#74aholmes wants to merge 1 commit intomicrosoft:masterfrom
Conversation
This change introduces a new interface for file input elements and updates the "files" object of all other input elements. The existing "files" object is `undefined` when the input type is not a "file" type. The new interface correctly reflects when the "files" object is a FileList.
|
Hi @aholmes, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! The agreement was validated by Microsoft and real humans are currently evaluating your PR. TTYL, MSBOT; |
|
I do not see any reference to the new HTMLFileInputElement in the spec. can you provide some context here? |
| files: FileList; | ||
| } | ||
|
|
||
| declare var HTMLFileInputElement: { |
There was a problem hiding this comment.
this introduces a new value HTMLFileInputElement that does not exisit any where.
|
My mistake, on both counts. I'll make an issue first next time. Regarding the type, I wasn't aware the types in lib.d.ts matched the types from the spec and created this type willy nilly. I'm okay with this pull request being rejected for that reason, however, I would like to ask if there is a way to alter HTMLInputElement's interface when it's type is "file". |
|
From the sepc: https://html.spec.whatwg.org/multipage/forms.html#dom-input-files
so it seems that the right thing to do here is to define I would punt on this PR. but please file an issue to track chainging the definition to include |
…microsoft#74) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.15.2 to 4.16.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.16.0/packages/parser) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This change introduces a new interface for file input elements and updates the "files" object of all other input elements.
The existing "files" object is
undefinedwhen the input type is not a "file" type. The new interface correctly reflects when the "files" object is a FileList.