-
Notifications
You must be signed in to change notification settings - Fork 12.8k
selectionStart should not be nullable: TSJS-lib-generator regression in 2.8.x #23094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
looking at the spec, seems like |
@mhegazy Interesting. It looks like
|
Do not think there is a simple way to do this really.
We auto-generate the library from the webidl file from edge. see https://github.com/Microsoft/TSJS-lib-generator. We have taken an update to the file in 2.8.
the input file can have bugs, and it can be wrong.. so yes. |
if you are sure it is not |
Oh yeah, the null assertion operator is new. But now that I think about it, the user may pass in an input element that I don't the type. So I'll just fallback to 0, just in case. Thanks 👍 |
TypeScript Version: 2.8.1
Search Terms:
selectionStart, selectionEnd
Code
Expected behavior:
el.selectionStart and el.selectionEnd should return
number
Actual behavior:
el.selectionStart and el.selectionEnd actually return
number | null
Playground Link:
Playground
Related Issues:
#22381 , styfle/copee#21
The text was updated successfully, but these errors were encountered: