-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Remove IE-only types from lib.d.ts #2698
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
That PR gets rid of pixelWidth and style is now CSSStyleDeclaration, but I see it's added ms- and webkit-prefixed properties and functions. That would lead to the same problem. But I can see the usefulness of wanting to support code like |
These are auto generated; @zhengbli has a script that allows creating the lib file from webidl definitions. we can augment the script to add these definitions as well, assuming we have a webidl for them. |
Yeah the new spec got ride of many of those interfaces but some still remain. I guess after publishing the script it is possible to create a customized version that removes all IE-only content. |
Can we remove the ones that are not needed from extensions.d.ts, specifically Map, Set and the typed arrays? |
Yeah I'm working on that too. Thanks! |
I ran a little analysis of the extension interfaces, and found out the use count of each one in the new spec: ArrayBuffer: 5 I plan to remove the unused ones and keep the others if that looks good. |
Here is what i propose: From extenstions.d.ts remove: Update types in extentions.d.ts to use the same typings in es.d.ts |
should be fixed by #2739 |
The various MS* interfaces and vars don't exist except in IE, and their extra properties are added to the standard properties. Eg: HTMLElement.style is of type MSStyleCSSProperties instead of CSSStyleDeclaration, which allows
element.style.pixelWidth
to compile but be undefined at runtime.The text was updated successfully, but these errors were encountered: