-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Migrate latest dom types into libdom.d.ts #44684
Conversation
@typescript-bot test this |
Some notes as I go through the fails
|
Additional notes:
|
Looking at the DT results, I think we'll need to:
Maybe |
This has all of:
Changed in it - still not enough to not get weird JSX issues in the compiler tests, but at least we can see how different it is with DT @typescript-bot test this |
Upstream dom.d.ts changes:
Changes to DT:
Something is up with
Rest of the tests |
TS 4.4's version of the DOM deprecates some more elements. Remove them from blissfuljs as well. microsoft/TypeScript#44684
From DT fixes:
|
TS 4.4's version of the DOM deprecates some more elements. Remove them from blissfuljs as well. microsoft/TypeScript#44684
Decided against adding |
@typescript-bot test this |
It refers to DOMError, which is no longer declared in TS 4.4's version of the DOM. microsoft/TypeScript#44684
It refers to DOMError, which is no longer declared in TS 4.4's version of the DOM. microsoft/TypeScript#44684
Discovered while upgrading to TS 4.4's DOM. microsoft/TypeScript#44684
@typescript-bot run dt - |
TS 4.4 further changes webrtc types. This PR makes it match those upcoming types, commenting out types that conflict between 4.4 and earlier versions of TS. Needed after microsoft/TypeScript#44684 is merged.
TS 4.4 changes mediacapture-record types. This PR makes it match those upcoming types. Needed after microsoft/TypeScript#44684 is merged.
* Make webcomponents.js work with TS 4.4 DOM TS 4.4 improves its types for web components. This PR makes DT match those upcoming types. Needed after microsoft/TypeScript#44684 is merged. * specify minimum ts version * Update minimum TS version of polymer too
* Make wicg-mediasessions work with TS 4.4 DOM TS 4.4 improves its types for MediaSesssion. This PR makes DT match those upcoming types. Needed after microsoft/TypeScript#44684 is merged. * Fix tests
* Make requestidlecallback work with TS 4.4 DOM TS 4.4 improves its types for requestidlecallback. This PR makes DT match those upcoming types. Needed after microsoft/TypeScript#44684 is merged. * remove redundant undefined for now
@@ -129,7 +129,7 @@ function test(required1: () => boolean, required2: () => boolean, b: boolean, op | |||
>f.apply : (this: Function, thisArg: any, argArray?: any) => any | |||
>f : () => void | |||
>apply : (this: Function, thisArg: any, argArray?: any) => any | |||
>parent : Window | |||
>parent : Window | null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orta should we really expect null
there?
https://developer.mozilla.org/en-US/docs/Web/API/Window/parent#specifications
https://html.spec.whatwg.org/multipage/browsers.html#dom-parent-dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* for visibility
It was actually legit comment :) -> microsoft/TypeScript-DOM-lib-generator#1089
thank you @orta @saschanaz
interface SVGElementInstance extends EventTarget { | ||
readonly correspondingElement: SVGElement; | ||
readonly correspondingUseElement: SVGUseElement; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These properties used to be available on SVGElement
, which used to extend SVGElementInstance
in LOC 12883. They disappeared during the upgrade from v4.3.5
to v4.4.2
.
Reported here: microsoft/TypeScript-DOM-lib-generator#1023 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removal was intentional, as per microsoft/TypeScript-DOM-lib-generator#1023 (comment):
Those are not available on any modern browser nor MDN, and thus are probably IE-specific properties. The removal is intended since the types library intends to only include things that exist in modern browsers.
Re: #44424 and microsoft/TypeScript-DOM-lib-generator#1023
types-web is the very actively maintained version of lib dom, most likely the version which we'd be basing
@types/web
on. It's quite far ahead of the current TS .d.ts.Note that there are new failures from this, I think due to the addition of
readonly
attributes