Skip to content

Routine update of dom-related lib.d.ts #7619

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

Merged
merged 2 commits into from
Apr 7, 2016

Conversation

zhengbli
Copy link
Contributor

Note: this update has tons of changes due to taking a new version of XML spec that shipped with windows 10 TH2.

Fixes:
#5708
#6501
#7218
#7561
#7562
#7563
#7197
#6534

@@ -226,9 +230,9 @@ declare var Event: {
}

interface EventTarget {
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL listener is optional. Although not sure what's the point in allowing this :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As the library file is generated from the spec file we got from Edge team, this is a reflection of https://github.com./Microsoft/TSJS-lib-generator/blob/master/inputfiles/browser.webidl.xml#L3558

@zhengbli
Copy link
Contributor Author

zhengbli commented Apr 7, 2016

@mhegazy any comments?

@mhegazy
Copy link
Contributor

mhegazy commented Apr 7, 2016

👍

@zhengbli zhengbli merged commit b9c4b02 into microsoft:master Apr 7, 2016
@zhengbli zhengbli deleted the updateDom20160321 branch April 7, 2016 22:33
@myitcv
Copy link

myitcv commented Apr 8, 2016

@zhengbli as a result of this merge and per microsoft/TypeScript-DOM-lib-generator#87 declare var HTMLPictureElement now appears twice in dom.generated.d.ts

As I mentioned in microsoft/TypeScript-DOM-lib-generator#87 I would try and fix this and submit a PR but I can build.sh on Ubuntu.

Any thoughts?

@zhengbli
Copy link
Contributor Author

zhengbli commented Apr 8, 2016

@myitcv it looks like the result of a bad git merge. I'll send a PR soon for a fix. Thanks for pointing out!

@sebilasse
Copy link

just btw:
searchParams seems to be missing in type URL as well …
https://developer.mozilla.org/en-US/docs/Web/API/URL

@zhengbli
Copy link
Contributor Author

@sebilasse
Indeed. Can you open a seperate issue to track it? You are also welcome to submit a PR to fix it at https://github.com./Microsoft/TSJS-lib-generator
The instructions are in the readme file in that repo. Thank you!

@sebilasse
Copy link

sebilasse commented Jun 1, 2016

@zhengbli Hm - ok. generator is up and running here now but wouldn't it be possible to edit the dom.generated.d.ts "directly" ?
Otherwise I assume it would need to different steps (am I right?) :

  1. Add a completely new interface URLSearchParams to addedTypes.json *

  2. Add the property URL.SearchParams to overridingTypes.json

*) is a living standard, has own constructor and methods

@zhengbli
Copy link
Contributor Author

zhengbli commented Jun 1, 2016

@sebilasse we never edit the *.generated.d.ts files by hand, because we periodically take a new version of the Edge idle and adopt the changes, manual changes would be very hard to maintain.

Yes you are right, except the URL.SearchParams would be added to the addedTypes.json as well as a new property. Thanks!

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Breaking Change Would introduce errors in existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants