Skip to content

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

Merged
zhengbli merged 2 commits into
microsoft:masterfrom
zhengbli:updateDom20160321
Apr 7, 2016
Merged

Routine update of dom-related lib.d.ts#7619
zhengbli merged 2 commits into
microsoft:masterfrom
zhengbli:updateDom20160321

Conversation

@zhengbli

Copy link
Copy Markdown

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


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

Copy link
Copy Markdown
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
Copy Markdown
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

zhengbli commented Apr 7, 2016

Copy link
Copy Markdown
Author

@mhegazy any comments?

@mhegazy

mhegazy commented Apr 7, 2016

Copy link
Copy Markdown
Contributor

👍

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

myitcv commented Apr 8, 2016

Copy link
Copy Markdown

@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

zhengbli commented Apr 8, 2016

Copy link
Copy Markdown
Author

@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
Copy Markdown

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
Copy Markdown
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

sebilasse commented Jun 1, 2016

Copy link
Copy Markdown

@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

zhengbli commented Jun 1, 2016

Copy link
Copy Markdown
Author

@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