Skip to content
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

DOM update 2024-04-16 #58211

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/lib/dom.asynciterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ interface FileSystemDirectoryHandle {
keys(): AsyncIterableIterator<string>;
values(): AsyncIterableIterator<FileSystemHandle>;
}

interface ReadableStream<R = any> {
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
}
244 changes: 211 additions & 33 deletions src/lib/dom.generated.d.ts

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/lib/dom.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
/// Window Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface AudioParam {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime) */
setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
Expand Down Expand Up @@ -65,6 +70,9 @@ interface CanvasPathDrawingStyles {
setLineDash(segments: Iterable<number>): void;
}

interface CustomStateSet extends Set<string> {
}

interface DOMRectList {
[Symbol.iterator](): IterableIterator<DOMRect>;
}
Expand Down
5 changes: 5 additions & 0 deletions src/lib/webworker.asynciterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ interface FileSystemDirectoryHandle {
keys(): AsyncIterableIterator<string>;
values(): AsyncIterableIterator<FileSystemHandle>;
}

interface ReadableStream<R = any> {
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
}
26 changes: 20 additions & 6 deletions src/lib/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,17 @@ interface ReadableStreamGetReaderOptions {
mode?: ReadableStreamReaderMode;
}

interface ReadableStreamIteratorOptions {
/**
* Asynchronously iterates over the chunks in the stream's internal queue.
*
* Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader. The lock will be released if the async iterator's return() method is called, e.g. by breaking out of the loop.
*
* By default, calling the async iterator's return() method will also cancel the stream. To prevent this, use the stream's values() method, passing true for the preventCancel option.
*/
preventCancel?: boolean;
}

interface ReadableStreamReadDoneResult<T> {
done: true;
value?: T;
Expand Down Expand Up @@ -629,16 +640,16 @@ interface RsaPssParams extends Algorithm {
interface SecurityPolicyViolationEventInit extends EventInit {
blockedURI?: string;
columnNumber?: number;
disposition: SecurityPolicyViolationEventDisposition;
documentURI: string;
effectiveDirective: string;
disposition?: SecurityPolicyViolationEventDisposition;
documentURI?: string;
effectiveDirective?: string;
lineNumber?: number;
originalPolicy: string;
originalPolicy?: string;
referrer?: string;
sample?: string;
sourceFile?: string;
statusCode: number;
violatedDirective: string;
statusCode?: number;
violatedDirective?: string;
}

interface StorageEstimate {
Expand Down Expand Up @@ -953,6 +964,8 @@ declare var AbortSignal: {
new(): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
abort(reason?: any): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: AbortSignal[]): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
timeout(milliseconds: number): AbortSignal;
};
Expand Down Expand Up @@ -5203,6 +5216,7 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {

/**
* This ServiceWorker API interface represents the global execution context of a service worker.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
*/
Expand Down
5 changes: 5 additions & 0 deletions src/lib/webworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
/// Worker Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface CSSNumericArray {
[Symbol.iterator](): IterableIterator<CSSNumericValue>;
entries(): IterableIterator<[number, CSSNumericValue]>;
Expand Down

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tests/baselines/reference/intersectionsOfLargeUnions.types
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

=== Performance Stats ===
Strict subtype cache: 1,000
Subtype cache: 1,000
Assignability cache: 1,000
Type Count: 2,500

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

=== Performance Stats ===
Strict subtype cache: 1,000
Subtype cache: 1,000
Assignability cache: 1,000
Type Count: 2,500

Expand Down
20 changes: 10 additions & 10 deletions tests/baselines/reference/mappedTypeRecursiveInference.errors.txt

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions tests/baselines/reference/mappedTypeRecursiveInference.types

Large diffs are not rendered by default.