Skip to content

Commit 2cfa765

Browse files
authored
Merge branch 'microsoft:main' into kdl/method
2 parents 03d4afe + a650695 commit 2cfa765

20 files changed

+151
-99
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/audioworklet.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ interface ReadableByteStreamController {
870870
*/
871871
close(): void;
872872
/**
873-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).
873+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
874874
*
875875
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
876876
*/

baselines/dom.generated.d.ts

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10037,6 +10037,19 @@ declare var DeviceOrientationEvent: {
1003710037
new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
1003810038
};
1003910039

10040+
/** Available only in secure contexts. */
10041+
interface DigitalCredential extends Credential {
10042+
readonly data: any;
10043+
readonly protocol: string;
10044+
toJSON(): any;
10045+
}
10046+
10047+
declare var DigitalCredential: {
10048+
prototype: DigitalCredential;
10049+
new(): DigitalCredential;
10050+
userAgentAllowsProtocol(protocol: string): boolean;
10051+
};
10052+
1004010053
interface DocumentEventMap extends GlobalEventHandlersEventMap {
1004110054
"DOMContentLoaded": Event;
1004210055
"fullscreenchange": Event;
@@ -10693,7 +10706,7 @@ declare var Document: {
1069310706
prototype: Document;
1069410707
new(): Document;
1069510708
/**
10696-
* The **`parseHTMLUnsafe()`** static method of the Document object is used to parse an HTML input, optionally filtering unwanted HTML elements and attributes, in order to create a new Document instance.
10709+
* The **`parseHTMLUnsafe()`** static method of the Document object is used to parse HTML input, optionally filtering unwanted HTML elements and attributes, in order to create a new Document instance.
1069710710
*
1069810711
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/parseHTMLUnsafe_static)
1069910712
*/
@@ -11367,7 +11380,7 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
1136711380
*/
1136811381
setAttributeNodeNS(attr: Attr): Attr | null;
1136911382
/**
11370-
* The **`setHTMLUnsafe()`** method of the Element interface is used to parse a string of HTML into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.
11383+
* The **`setHTMLUnsafe()`** method of the Element interface is used to parse HTML input into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.
1137111384
*
1137211385
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setHTMLUnsafe)
1137311386
*/
@@ -15297,7 +15310,7 @@ interface HTMLInputElement extends HTMLElement, PopoverTargetAttributes {
1529715310
*/
1529815311
readonly webkitEntries: ReadonlyArray<FileSystemEntry>;
1529915312
/**
15300-
* The **`webkitdirectory`** property of the HTMLInputElement interface reflects the `webkitdirectory` HTML attribute, which indicates that `<input type='file'>` elements should let the user select directories instead of files.
15313+
* The **`webkitdirectory`** property of the HTMLInputElement interface reflects the `webkitdirectory` HTML attribute, which indicates that `<input type='file'>` elements can only select directories instead of files.
1530115314
*
1530215315
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/webkitdirectory)
1530315316
*/
@@ -17159,7 +17172,7 @@ interface HTMLTableCellElement extends HTMLElement {
1715917172
*/
1716017173
chOff: string;
1716117174
/**
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.
17175+
* 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.
1716317176
*
1716417177
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCellElement/colSpan)
1716517178
*/
@@ -17180,7 +17193,7 @@ interface HTMLTableCellElement extends HTMLElement {
1718017193
*/
1718117194
noWrap: boolean;
1718217195
/**
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.
17196+
* 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.
1718417197
*
1718517198
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCellElement/rowSpan)
1718617199
*/
@@ -17239,7 +17252,7 @@ interface HTMLTableColElement extends HTMLElement {
1723917252
*/
1724017253
chOff: string;
1724117254
/**
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.
17255+
* 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.
1724317256
*
1724417257
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableColElement/span)
1724517258
*/
@@ -18159,7 +18172,7 @@ declare var Headers: {
1815918172
*/
1816018173
interface Highlight {
1816118174
/**
18162-
* It is possible to create Range objects that overlap in a document.
18175+
* The `priority` property of the Highlight interface is a number used to determine which highlight's styles should be used to resolve style conflicts in overlapping parts.
1816318176
*
1816418177
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/priority)
1816518178
*/
@@ -24576,7 +24589,7 @@ interface PublicKeyCredential extends Credential {
2457624589
*/
2457724590
readonly response: AuthenticatorResponse;
2457824591
/**
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.
24592+
* 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.
2458024593
*
2458124594
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/getClientExtensionResults)
2458224595
*/
@@ -25583,7 +25596,7 @@ declare var RTCPeerConnectionIceEvent: {
2558325596
*/
2558425597
interface RTCRtpReceiver {
2558525598
/**
25586-
* The **`jitterBufferTarget`** property of the RTCRtpReceiver interface is a DOMHighResTimeStamp that indicates the application's preferred duration, in milliseconds, for which the jitter buffer should hold media before playing it out.
25599+
* The **`jitterBufferTarget`** property of the RTCRtpReceiver interface is a DOMHighResTimeStamp that indicates the application's preferred duration, in milliseconds, for which the jitter should hold media before playing it out.
2558725600
*
2558825601
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/jitterBufferTarget)
2558925602
*/
@@ -26123,7 +26136,7 @@ interface ReadableByteStreamController {
2612326136
*/
2612426137
close(): void;
2612526138
/**
26126-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).
26139+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
2612726140
*
2612826141
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
2612926142
*/
@@ -31133,7 +31146,7 @@ interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot {
3113331146
*/
3113431147
getHTML(options?: GetHTMLOptions): string;
3113531148
/**
31136-
* The **`setHTMLUnsafe()`** method of the ShadowRoot interface can be used to parse a string of HTML into a DocumentFragment, optionally filtering out unwanted elements and attributes, and then use it to replace the existing tree in the Shadow DOM.
31149+
* The **`setHTMLUnsafe()`** method of the ShadowRoot interface can be used to parse HTML input into a DocumentFragment, optionally filtering out unwanted elements and attributes, and then use it to replace the existing tree in the Shadow DOM.
3113731150
*
3113831151
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/setHTMLUnsafe)
3113931152
*/
@@ -33294,7 +33307,7 @@ interface URLPattern {
3329433307
*/
3329533308
exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
3329633309
/**
33297-
* The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
33310+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
3329833311
*
3329933312
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
3330033313
*/
@@ -36680,7 +36693,7 @@ interface WebSocket extends EventTarget {
3668036693
*
3668136694
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
3668236695
*/
36683-
readonly readyState: number;
36696+
readonly readyState: 0 | 1 | 2 | 3;
3668436697
/**
3668536698
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
3668636699
*

baselines/serviceworker.generated.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6396,7 +6396,7 @@ interface ReadableByteStreamController {
63966396
*/
63976397
close(): void;
63986398
/**
6399-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).
6399+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
64006400
*
64016401
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
64026402
*/
@@ -7852,7 +7852,7 @@ interface URLPattern {
78527852
*/
78537853
exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
78547854
/**
7855-
* The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
7855+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
78567856
*
78577857
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
78587858
*/
@@ -10472,7 +10472,7 @@ interface WebSocket extends EventTarget {
1047210472
*
1047310473
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
1047410474
*/
10475-
readonly readyState: number;
10475+
readonly readyState: 0 | 1 | 2 | 3;
1047610476
/**
1047710477
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
1047810478
*

baselines/sharedworker.generated.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5979,7 +5979,7 @@ interface ReadableByteStreamController {
59795979
*/
59805980
close(): void;
59815981
/**
5982-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).
5982+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
59835983
*
59845984
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
59855985
*/
@@ -7395,7 +7395,7 @@ interface URLPattern {
73957395
*/
73967396
exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
73977397
/**
7398-
* The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
7398+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
73997399
*
74007400
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
74017401
*/
@@ -10015,7 +10015,7 @@ interface WebSocket extends EventTarget {
1001510015
*
1001610016
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
1001710017
*/
10018-
readonly readyState: number;
10018+
readonly readyState: 0 | 1 | 2 | 3;
1001910019
/**
1002010020
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
1002110021
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ interface ReadableByteStreamController {
870870
*/
871871
close(): void;
872872
/**
873-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).
873+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
874874
*
875875
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
876876
*/

0 commit comments

Comments
 (0)