You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
selectionStart should not be nullable: TSJS-lib-generator regression in 2.8.x #23094
Activity
mhegazy commentedon Apr 2, 2018
looking at the spec, seems like
nullis a possible value for selectionStart and selectionEnd.styfle commentedon Apr 2, 2018
Mohamed Hegazy (@mhegazy) Interesting. It looks like
type=textis never null buttype=emailis null for example.HTMLInputElementis type=text?mhegazy commentedon Apr 2, 2018
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.
mhegazy commentedon Apr 2, 2018
if you are sure it is not
null, you can use the null assertion operator!styfle commentedon Apr 2, 2018
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 👍