Skip to content

Conversation

@mariusschulz
Copy link
Contributor

Fixes #20419.

The start and end parameters of the HTMLInputElement.setSelectionRange() API are not optional.

In addition, the direction parameter only accepts one of three string values, which is why it's now typed using string literal types.

The `start` and `end` parameters aren't optional. Also, the `direction` parameter only accepts one of three string values, which are now modeled as a union of string literal types.

More information: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
Copy link

@Jessidhia Jessidhia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a file generated with scripts from the TSJS-lib-generator repository, so they can't be edited here.

More specifically, these are generated from Edge's IDL XML, also not allowed to be edited, from https://github.com/Microsoft/TSJS-lib-generator/blob/5b748d4b9e0831c8480d84edf6e65fa6c8f7afd3/inputfiles/browser.webidl.xml#L5162-L5166 and https://github.com/Microsoft/TSJS-lib-generator/blob/5b748d4b9e0831c8480d84edf6e65fa6c8f7afd3/inputfiles/browser.webidl.xml#L5901-L5904.

To correct them, you need to send a PR against https://github.com/Microsoft/TSJS-lib-generator/blob/master/inputfiles/overridingTypes.json.

@mariusschulz
Copy link
Contributor Author

@Kovensky Thanks for pointing me in the right direction. Here's the new PR: microsoft/TypeScript-DOM-lib-generator#340

Let me know if you need me to change something else!

@HolgerJeromin
Copy link
Contributor

This PR should be closed, as this was merged by #21071

@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants