Skip to content

Commit d1e8871

Browse files
committed
2 parents ff7a14e + ba94904 commit d1e8871

14 files changed

+136
-58
lines changed

README.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -86,25 +86,6 @@ If you are familiar with Web IDL, you may also want to check whether the upstrea
8686
- `addedTypes.jsonc`: types that should exist but are missing from the spec data.
8787
- `overridingTypes.jsonc`: types that are defined in the spec but have TypeScript-friendly modifications in the json files.
8888
- `removedTypes.jsonc`: types that are defined in the spec but should be removed.
89+
- `patches/*.kdl`: KDL types
8990
- `comments.json`: comment strings to be embedded in the generated .d.ts files.
9091
- `deprecatedMessage.json`: the reason why one type is deprecated.
91-
92-
## Deployment to TypeScript
93-
94-
To migrate the *.d.ts files into TypeScript:
95-
96-
1. [Trigger the workflow here](https://github.com/microsoft/TypeScript-DOM-lib-generator/actions/workflows/pr-to-typescript.yml) - this will send a PR to TypeScript under your alias.
97-
98-
99-
1. Update the README table with the mappings for versions in the `@types/[lib]`. E.g. TS 4.5 -> `@types/web` `0.0.23`. Find that number here: https://www.npmjs.com/package/@types/web
100-
101-
1. Generate a CHANGELOG for the releases:
102-
103-
```sh
104-
# lib from to
105-
npm run ts-changelog -- @types/web 0.0.2 0.0.23
106-
```
107-
108-
You might need to run `git pull origin main --tags` to run this ^
109-
110-
1. Add the CHANGELOG to the release issue

baselines/dom.generated.d.ts

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6851,6 +6851,7 @@ interface CSSStyleProperties extends CSSStyleDeclaration {
68516851
textAlignLast: string;
68526852
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-anchor) */
68536853
textAnchor: string;
6854+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-autospace) */
68546855
textAutospace: string;
68556856
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-box) */
68566857
textBox: string;
@@ -10037,6 +10038,19 @@ declare var DeviceOrientationEvent: {
1003710038
new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
1003810039
};
1003910040

10041+
/** Available only in secure contexts. */
10042+
interface DigitalCredential extends Credential {
10043+
readonly data: any;
10044+
readonly protocol: string;
10045+
toJSON(): any;
10046+
}
10047+
10048+
declare var DigitalCredential: {
10049+
prototype: DigitalCredential;
10050+
new(): DigitalCredential;
10051+
userAgentAllowsProtocol(protocol: string): boolean;
10052+
};
10053+
1004010054
interface DocumentEventMap extends GlobalEventHandlersEventMap {
1004110055
"DOMContentLoaded": Event;
1004210056
"fullscreenchange": Event;
@@ -11278,6 +11292,9 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
1127811292
*
1127911293
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/matches)
1128011294
*/
11295+
matches<K extends keyof HTMLElementTagNameMap>(selectors: K): this is HTMLElementTagNameMap[K];
11296+
matches<K extends keyof SVGElementTagNameMap>(selectors: K): this is SVGElementTagNameMap[K];
11297+
matches<K extends keyof MathMLElementTagNameMap>(selectors: K): this is MathMLElementTagNameMap[K];
1128111298
matches(selectors: string): boolean;
1128211299
/**
1128311300
* The **`releasePointerCapture()`** method of the Element interface releases (stops) _pointer capture_ that was previously set for a specific (PointerEvent) _pointer_.
@@ -14399,7 +14416,7 @@ interface HTMLFormElement extends HTMLElement {
1439914416
*/
1440014417
autocomplete: AutoFillBase;
1440114418
/**
14402-
* The HTMLFormElement property **`elements`** returns an HTMLFormControlsCollection listing all the form controls contained in the form element.
14419+
* The **`elements`** property of the HTMLFormElement interface returns an HTMLFormControlsCollection listing all the listed form controls associated with the form element.
1440314420
*
1440414421
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/elements)
1440514422
*/
@@ -17159,7 +17176,7 @@ interface HTMLTableCellElement extends HTMLElement {
1715917176
*/
1716017177
chOff: string;
1716117178
/**
17162-
* The **`colSpan`** read-only property of the HTMLTableCellElement interface represents the number of columns this cell must span; this lets the cell occupy space across multiple columns of the table.
17179+
* The **`colSpan`** property of the HTMLTableCellElement interface represents the number of columns this cell must span; this lets the cell occupy space across multiple columns of the table.
1716317180
*
1716417181
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCellElement/colSpan)
1716517182
*/
@@ -17180,7 +17197,7 @@ interface HTMLTableCellElement extends HTMLElement {
1718017197
*/
1718117198
noWrap: boolean;
1718217199
/**
17183-
* The **`rowSpan`** read-only property of the HTMLTableCellElement interface represents the number of rows this cell must span; this lets the cell occupy space across multiple rows of the table.
17200+
* The **`rowSpan`** property of the HTMLTableCellElement interface represents the number of rows this cell must span; this lets the cell occupy space across multiple rows of the table.
1718417201
*
1718517202
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCellElement/rowSpan)
1718617203
*/
@@ -17239,7 +17256,7 @@ interface HTMLTableColElement extends HTMLElement {
1723917256
*/
1724017257
chOff: string;
1724117258
/**
17242-
* The **`span`** read-only property of the HTMLTableColElement interface represents the number of columns this col or colgroup must span; this lets the column occupy space across multiple columns of the table.
17259+
* The **`span`** property of the HTMLTableColElement interface represents the number of columns this col or colgroup must span; this lets the column occupy space across multiple columns of the table.
1724317260
*
1724417261
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableColElement/span)
1724517262
*/
@@ -23803,6 +23820,7 @@ declare var PerformanceObserverEntryList: {
2380323820
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformancePaintTiming)
2380423821
*/
2380523822
interface PerformancePaintTiming extends PerformanceEntry {
23823+
toJSON(): any;
2380623824
}
2380723825

2380823826
declare var PerformancePaintTiming: {
@@ -24374,7 +24392,7 @@ interface PointerEvent extends MouseEvent {
2437424392
*/
2437524393
readonly persistentDeviceId: number;
2437624394
/**
24377-
* The **`pointerId`** read-only property of the PointerEvent interface is an identifier assigned to a given pointer event.
24395+
* The **`pointerId`** read-only property of the PointerEvent interface is an identifier assigned to the pointer that triggered the event.
2437824396
*
2437924397
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/pointerId)
2438024398
*/
@@ -24576,7 +24594,7 @@ interface PublicKeyCredential extends Credential {
2457624594
*/
2457724595
readonly response: AuthenticatorResponse;
2457824596
/**
24579-
* The **`getClientExtensionResults()`** method of the PublicKeyCredential interface returns a map between the identifiers of extensions requested during credential creation or authentication, and their results after processing by the user agent.
24597+
* The **`getClientExtensionResults()`** method of the PublicKeyCredential interface returns an object mapping the identifiers of extensions requested during credential creation or authentication, and their results after processing by the user agent.
2458024598
*
2458124599
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/getClientExtensionResults)
2458224600
*/

baselines/ts5.5/dom.generated.d.ts

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6844,6 +6844,7 @@ interface CSSStyleProperties extends CSSStyleDeclaration {
68446844
textAlignLast: string;
68456845
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-anchor) */
68466846
textAnchor: string;
6847+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-autospace) */
68476848
textAutospace: string;
68486849
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-box) */
68496850
textBox: string;
@@ -10029,6 +10030,19 @@ declare var DeviceOrientationEvent: {
1002910030
new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
1003010031
};
1003110032

10033+
/** Available only in secure contexts. */
10034+
interface DigitalCredential extends Credential {
10035+
readonly data: any;
10036+
readonly protocol: string;
10037+
toJSON(): any;
10038+
}
10039+
10040+
declare var DigitalCredential: {
10041+
prototype: DigitalCredential;
10042+
new(): DigitalCredential;
10043+
userAgentAllowsProtocol(protocol: string): boolean;
10044+
};
10045+
1003210046
interface DocumentEventMap extends GlobalEventHandlersEventMap {
1003310047
"DOMContentLoaded": Event;
1003410048
"fullscreenchange": Event;
@@ -11268,6 +11282,9 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
1126811282
*
1126911283
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/matches)
1127011284
*/
11285+
matches<K extends keyof HTMLElementTagNameMap>(selectors: K): this is HTMLElementTagNameMap[K];
11286+
matches<K extends keyof SVGElementTagNameMap>(selectors: K): this is SVGElementTagNameMap[K];
11287+
matches<K extends keyof MathMLElementTagNameMap>(selectors: K): this is MathMLElementTagNameMap[K];
1127111288
matches(selectors: string): boolean;
1127211289
/**
1127311290
* The **`releasePointerCapture()`** method of the Element interface releases (stops) _pointer capture_ that was previously set for a specific (PointerEvent) _pointer_.
@@ -14386,7 +14403,7 @@ interface HTMLFormElement extends HTMLElement {
1438614403
*/
1438714404
autocomplete: AutoFillBase;
1438814405
/**
14389-
* The HTMLFormElement property **`elements`** returns an HTMLFormControlsCollection listing all the form controls contained in the form element.
14406+
* The **`elements`** property of the HTMLFormElement interface returns an HTMLFormControlsCollection listing all the listed form controls associated with the form element.
1439014407
*
1439114408
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/elements)
1439214409
*/
@@ -17138,7 +17155,7 @@ interface HTMLTableCellElement extends HTMLElement {
1713817155
*/
1713917156
chOff: string;
1714017157
/**
17141-
* The **`colSpan`** read-only property of the HTMLTableCellElement interface represents the number of columns this cell must span; this lets the cell occupy space across multiple columns of the table.
17158+
* The **`colSpan`** property of the HTMLTableCellElement interface represents the number of columns this cell must span; this lets the cell occupy space across multiple columns of the table.
1714217159
*
1714317160
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCellElement/colSpan)
1714417161
*/
@@ -17159,7 +17176,7 @@ interface HTMLTableCellElement extends HTMLElement {
1715917176
*/
1716017177
noWrap: boolean;
1716117178
/**
17162-
* The **`rowSpan`** read-only property of the HTMLTableCellElement interface represents the number of rows this cell must span; this lets the cell occupy space across multiple rows of the table.
17179+
* The **`rowSpan`** property of the HTMLTableCellElement interface represents the number of rows this cell must span; this lets the cell occupy space across multiple rows of the table.
1716317180
*
1716417181
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCellElement/rowSpan)
1716517182
*/
@@ -17218,7 +17235,7 @@ interface HTMLTableColElement extends HTMLElement {
1721817235
*/
1721917236
chOff: string;
1722017237
/**
17221-
* The **`span`** read-only property of the HTMLTableColElement interface represents the number of columns this col or colgroup must span; this lets the column occupy space across multiple columns of the table.
17238+
* The **`span`** property of the HTMLTableColElement interface represents the number of columns this col or colgroup must span; this lets the column occupy space across multiple columns of the table.
1722217239
*
1722317240
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableColElement/span)
1722417241
*/
@@ -23782,6 +23799,7 @@ declare var PerformanceObserverEntryList: {
2378223799
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformancePaintTiming)
2378323800
*/
2378423801
interface PerformancePaintTiming extends PerformanceEntry {
23802+
toJSON(): any;
2378523803
}
2378623804

2378723805
declare var PerformancePaintTiming: {
@@ -24353,7 +24371,7 @@ interface PointerEvent extends MouseEvent {
2435324371
*/
2435424372
readonly persistentDeviceId: number;
2435524373
/**
24356-
* The **`pointerId`** read-only property of the PointerEvent interface is an identifier assigned to a given pointer event.
24374+
* The **`pointerId`** read-only property of the PointerEvent interface is an identifier assigned to the pointer that triggered the event.
2435724375
*
2435824376
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/pointerId)
2435924377
*/
@@ -24555,7 +24573,7 @@ interface PublicKeyCredential extends Credential {
2455524573
*/
2455624574
readonly response: AuthenticatorResponse;
2455724575
/**
24558-
* The **`getClientExtensionResults()`** method of the PublicKeyCredential interface returns a map between the identifiers of extensions requested during credential creation or authentication, and their results after processing by the user agent.
24576+
* The **`getClientExtensionResults()`** method of the PublicKeyCredential interface returns an object mapping the identifiers of extensions requested during credential creation or authentication, and their results after processing by the user agent.
2455924577
*
2456024578
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/getClientExtensionResults)
2456124579
*/

baselines/ts5.5/webworker.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7440,7 +7440,7 @@ interface RTCRtpScriptTransformer extends EventTarget {
74407440
*
74417441
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/generateKeyFrame)
74427442
*/
7443-
generateKeyFrame(rid?: string): Promise<number>;
7443+
generateKeyFrame(rid?: string): Promise<void>;
74447444
/**
74457445
* The **`sendKeyFrameRequest()`** method of the RTCRtpScriptTransformer interface may be called by a WebRTC Encoded Transform that is processing incoming encoded video frames, in order to request a key frame from the sender.
74467446
*

baselines/ts5.6/dom.generated.d.ts

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6851,6 +6851,7 @@ interface CSSStyleProperties extends CSSStyleDeclaration {
68516851
textAlignLast: string;
68526852
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-anchor) */
68536853
textAnchor: string;
6854+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-autospace) */
68546855
textAutospace: string;
68556856
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-box) */
68566857
textBox: string;
@@ -10037,6 +10038,19 @@ declare var DeviceOrientationEvent: {
1003710038
new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
1003810039
};
1003910040

10041+
/** Available only in secure contexts. */
10042+
interface DigitalCredential extends Credential {
10043+
readonly data: any;
10044+
readonly protocol: string;
10045+
toJSON(): any;
10046+
}
10047+
10048+
declare var DigitalCredential: {
10049+
prototype: DigitalCredential;
10050+
new(): DigitalCredential;
10051+
userAgentAllowsProtocol(protocol: string): boolean;
10052+
};
10053+
1004010054
interface DocumentEventMap extends GlobalEventHandlersEventMap {
1004110055
"DOMContentLoaded": Event;
1004210056
"fullscreenchange": Event;
@@ -11278,6 +11292,9 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
1127811292
*
1127911293
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/matches)
1128011294
*/
11295+
matches<K extends keyof HTMLElementTagNameMap>(selectors: K): this is HTMLElementTagNameMap[K];
11296+
matches<K extends keyof SVGElementTagNameMap>(selectors: K): this is SVGElementTagNameMap[K];
11297+
matches<K extends keyof MathMLElementTagNameMap>(selectors: K): this is MathMLElementTagNameMap[K];
1128111298
matches(selectors: string): boolean;
1128211299
/**
1128311300
* The **`releasePointerCapture()`** method of the Element interface releases (stops) _pointer capture_ that was previously set for a specific (PointerEvent) _pointer_.
@@ -14399,7 +14416,7 @@ interface HTMLFormElement extends HTMLElement {
1439914416
*/
1440014417
autocomplete: AutoFillBase;
1440114418
/**
14402-
* The HTMLFormElement property **`elements`** returns an HTMLFormControlsCollection listing all the form controls contained in the form element.
14419+
* The **`elements`** property of the HTMLFormElement interface returns an HTMLFormControlsCollection listing all the listed form controls associated with the form element.
1440314420
*
1440414421
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/elements)
1440514422
*/
@@ -17159,7 +17176,7 @@ interface HTMLTableCellElement extends HTMLElement {
1715917176
*/
1716017177
chOff: string;
1716117178
/**
17162-
* The **`colSpan`** read-only property of the HTMLTableCellElement interface represents the number of columns this cell must span; this lets the cell occupy space across multiple columns of the table.
17179+
* The **`colSpan`** property of the HTMLTableCellElement interface represents the number of columns this cell must span; this lets the cell occupy space across multiple columns of the table.
1716317180
*
1716417181
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCellElement/colSpan)
1716517182
*/
@@ -17180,7 +17197,7 @@ interface HTMLTableCellElement extends HTMLElement {
1718017197
*/
1718117198
noWrap: boolean;
1718217199
/**
17183-
* The **`rowSpan`** read-only property of the HTMLTableCellElement interface represents the number of rows this cell must span; this lets the cell occupy space across multiple rows of the table.
17200+
* The **`rowSpan`** property of the HTMLTableCellElement interface represents the number of rows this cell must span; this lets the cell occupy space across multiple rows of the table.
1718417201
*
1718517202
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCellElement/rowSpan)
1718617203
*/
@@ -17239,7 +17256,7 @@ interface HTMLTableColElement extends HTMLElement {
1723917256
*/
1724017257
chOff: string;
1724117258
/**
17242-
* The **`span`** read-only property of the HTMLTableColElement interface represents the number of columns this col or colgroup must span; this lets the column occupy space across multiple columns of the table.
17259+
* The **`span`** property of the HTMLTableColElement interface represents the number of columns this col or colgroup must span; this lets the column occupy space across multiple columns of the table.
1724317260
*
1724417261
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableColElement/span)
1724517262
*/
@@ -23803,6 +23820,7 @@ declare var PerformanceObserverEntryList: {
2380323820
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformancePaintTiming)
2380423821
*/
2380523822
interface PerformancePaintTiming extends PerformanceEntry {
23823+
toJSON(): any;
2380623824
}
2380723825

2380823826
declare var PerformancePaintTiming: {
@@ -24374,7 +24392,7 @@ interface PointerEvent extends MouseEvent {
2437424392
*/
2437524393
readonly persistentDeviceId: number;
2437624394
/**
24377-
* The **`pointerId`** read-only property of the PointerEvent interface is an identifier assigned to a given pointer event.
24395+
* The **`pointerId`** read-only property of the PointerEvent interface is an identifier assigned to the pointer that triggered the event.
2437824396
*
2437924397
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/pointerId)
2438024398
*/
@@ -24576,7 +24594,7 @@ interface PublicKeyCredential extends Credential {
2457624594
*/
2457724595
readonly response: AuthenticatorResponse;
2457824596
/**
24579-
* The **`getClientExtensionResults()`** method of the PublicKeyCredential interface returns a map between the identifiers of extensions requested during credential creation or authentication, and their results after processing by the user agent.
24597+
* The **`getClientExtensionResults()`** method of the PublicKeyCredential interface returns an object mapping the identifiers of extensions requested during credential creation or authentication, and their results after processing by the user agent.
2458024598
*
2458124599
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/getClientExtensionResults)
2458224600
*/

baselines/ts5.6/webworker.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7440,7 +7440,7 @@ interface RTCRtpScriptTransformer extends EventTarget {
74407440
*
74417441
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/generateKeyFrame)
74427442
*/
7443-
generateKeyFrame(rid?: string): Promise<number>;
7443+
generateKeyFrame(rid?: string): Promise<void>;
74447444
/**
74457445
* The **`sendKeyFrameRequest()`** method of the RTCRtpScriptTransformer interface may be called by a WebRTC Encoded Transform that is processing incoming encoded video frames, in order to request a key frame from the sender.
74467446
*

0 commit comments

Comments
 (0)