diff --git a/cli/build.rs b/cli/build.rs index e5b626d764d85b..38f2fff2fe637e 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -141,7 +141,9 @@ fn create_compiler_snapshot( "es2019.symbol", "es2020.bigint", "es2020", + "es2020.date", "es2020.intl", + "es2020.number", "es2020.promise", "es2020.sharedmemory", "es2020.string", diff --git a/cli/dts/lib.dom.d.ts b/cli/dts/lib.dom.d.ts index 04fa72459537a3..f1761f1c52e4e5 100644 --- a/cli/dts/lib.dom.d.ts +++ b/cli/dts/lib.dom.d.ts @@ -721,6 +721,19 @@ interface LockOptions { steal?: boolean; } +interface MIDIConnectionEventInit extends EventInit { + port?: MIDIPort; +} + +interface MIDIMessageEventInit extends EventInit { + data?: Uint8Array; +} + +interface MIDIOptions { + software?: boolean; + sysex?: boolean; +} + interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo { configuration?: MediaDecodingConfiguration; } @@ -951,6 +964,11 @@ interface MutationObserverInit { subtree?: boolean; } +interface NavigationPreloadState { + enabled?: boolean; + headerValue?: string; +} + interface NotificationAction { action: string; icon?: string; @@ -1263,6 +1281,35 @@ interface RTCDtlsFingerprint { value?: string; } +interface RTCEncodedAudioFrameMetadata { + contributingSources?: number[]; + synchronizationSource?: number; +} + +interface RTCEncodedVideoFrameMetadata { + contributingSources?: number[]; + dependencies?: number[]; + frameId?: number; + height?: number; + spatialIndex?: number; + synchronizationSource?: number; + temporalIndex?: number; + width?: number; +} + +interface RTCErrorEventInit extends EventInit { + error: RTCError; +} + +interface RTCErrorInit { + errorDetail: RTCErrorDetailType; + httpRequestStatusCode?: number; + receivedAlert?: number; + sctpCauseCode?: number; + sdpLineNumber?: number; + sentAlert?: number; +} + interface RTCIceCandidateInit { candidate?: string; sdpMLineIndex?: number | null; @@ -1768,6 +1815,13 @@ interface UnderlyingSource { type?: undefined; } +interface VideoColorSpaceInit { + fullRange?: boolean; + matrix?: VideoMatrixCoefficients; + primaries?: VideoColorPrimaries; + transfer?: VideoTransferCharacteristics; +} + interface VideoConfiguration { bitrate: number; colorGamut?: ColorGamut; @@ -1780,6 +1834,19 @@ interface VideoConfiguration { width: number; } +interface VideoFrameMetadata { + captureTime?: DOMHighResTimeStamp; + expectedDisplayTime: DOMHighResTimeStamp; + height: number; + mediaTime: number; + presentationTime: DOMHighResTimeStamp; + presentedFrames: number; + processingDuration?: number; + receiveTime?: DOMHighResTimeStamp; + rtpTimestamp?: number; + width: number; +} + interface WaveShaperOptions extends AudioNodeOptions { curve?: number[] | Float32Array; oversample?: OverSampleType; @@ -1914,6 +1981,8 @@ interface AbortSignal extends EventTarget { /** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */ readonly aborted: boolean; onabort: ((this: AbortSignal, ev: Event) => any) | null; + readonly reason: any; + throwIfAborted(): void; addEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -2409,7 +2478,7 @@ interface Blob { readonly type: string; arrayBuffer(): Promise; slice(start?: number, end?: number, contentType?: string): Blob; - stream(): ReadableStream; + stream(): ReadableStream; text(): Promise; } @@ -2784,6 +2853,7 @@ interface CSSStyleDeclaration { columns: string; contain: string; content: string; + contentVisibility: string; counterIncrement: string; counterReset: string; counterSet: string; @@ -2819,7 +2889,6 @@ interface CSSStyleDeclaration { fontStyle: string; fontSynthesis: string; fontVariant: string; - /** @deprecated */ fontVariantAlternates: string; fontVariantCaps: string; fontVariantEastAsian: string; @@ -2893,6 +2962,14 @@ interface CSSStyleDeclaration { markerMid: string; markerStart: string; mask: string; + maskClip: string; + maskComposite: string; + maskImage: string; + maskMode: string; + maskOrigin: string; + maskPosition: string; + maskRepeat: string; + maskSize: string; maskType: string; maxBlockSize: string; maxHeight: string; @@ -2906,7 +2983,6 @@ interface CSSStyleDeclaration { objectFit: string; objectPosition: string; offset: string; - offsetAnchor: string; offsetDistance: string; offsetPath: string; offsetRotate: string; @@ -2951,6 +3027,7 @@ interface CSSStyleDeclaration { placeSelf: string; pointerEvents: string; position: string; + printColorAdjust: string; quotes: string; resize: string; right: string; @@ -3251,13 +3328,13 @@ declare var CSSTransition: { * Available only in secure contexts. */ interface Cache { - add(request: RequestInfo): Promise; + add(request: RequestInfo | URL): Promise; addAll(requests: RequestInfo[]): Promise; - delete(request: RequestInfo, options?: CacheQueryOptions): Promise; - keys(request?: RequestInfo, options?: CacheQueryOptions): Promise>; - match(request: RequestInfo, options?: CacheQueryOptions): Promise; - matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise>; - put(request: RequestInfo, response: Response): Promise; + delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise; + keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise>; + match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise; + matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise>; + put(request: RequestInfo | URL, response: Response): Promise; } declare var Cache: { @@ -3273,7 +3350,7 @@ interface CacheStorage { delete(cacheName: string): Promise; has(cacheName: string): Promise; keys(): Promise; - match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise; + match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise; open(cacheName: string): Promise; } @@ -3538,6 +3615,7 @@ declare var ClipboardEvent: { new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent; }; +/** Available only in secure contexts. */ interface ClipboardItem { readonly types: ReadonlyArray; getType(type: string): Promise; @@ -3545,7 +3623,7 @@ interface ClipboardItem { declare var ClipboardItem: { prototype: ClipboardItem; - new(items: Record>, options?: ClipboardItemOptions): ClipboardItem; + new(items: Record>, options?: ClipboardItemOptions): ClipboardItem; }; /** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */ @@ -4215,6 +4293,7 @@ declare var DeviceOrientationEvent: { }; interface DocumentEventMap extends DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap { + "DOMContentLoaded": Event; "fullscreenchange": Event; "fullscreenerror": Event; "pointerlockchange": Event; @@ -4432,6 +4511,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; createEvent(eventInterface: "DragEvent"): DragEvent; createEvent(eventInterface: "ErrorEvent"): ErrorEvent; + createEvent(eventInterface: "Event"): Event; + createEvent(eventInterface: "Events"): Event; createEvent(eventInterface: "FocusEvent"): FocusEvent; createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent; createEvent(eventInterface: "FormDataEvent"): FormDataEvent; @@ -4440,6 +4521,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; createEvent(eventInterface: "InputEvent"): InputEvent; createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; + createEvent(eventInterface: "MIDIConnectionEvent"): MIDIConnectionEvent; + createEvent(eventInterface: "MIDIMessageEvent"): MIDIMessageEvent; createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; @@ -4460,6 +4543,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent; createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent; createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent; + createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; @@ -4891,8 +4975,20 @@ interface ElementContentEditable { } interface ElementInternals extends ARIAMixin { + /** Returns the form owner of internals's target element. */ + readonly form: HTMLFormElement | null; + /** Returns a NodeList of all the label elements that internals's target element is associated with. */ + readonly labels: NodeList; /** Returns the ShadowRoot for internals's target element, if the target element is a shadow host, or null otherwise. */ readonly shadowRoot: ShadowRoot | null; + /** Returns true if internals's target element will be validated when the form is submitted; false otherwise. */ + readonly willValidate: boolean; + /** + * Sets both the state and submission value of internals's target element to value. + * + * If value is null, the element won't participate in form submission. + */ + setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void; } declare var ElementInternals: { @@ -4966,6 +5062,15 @@ declare var Event: { readonly NONE: number; }; +interface EventCounts { + forEach(callbackfn: (value: number, key: string, parent: EventCounts) => void, thisArg?: any): void; +} + +declare var EventCounts: { + prototype: EventCounts; + new(): EventCounts; +}; + interface EventListener { (evt: Event): void; } @@ -6159,14 +6264,29 @@ declare var HTMLDetailsElement: { new(): HTMLDetailsElement; }; -/** @deprecated this is not available in most browsers */ interface HTMLDialogElement extends HTMLElement { + open: boolean; + returnValue: string; + /** + * Closes the dialog element. + * + * The argument, if provided, provides a return value. + */ + close(returnValue?: string): void; + /** Displays the dialog element. */ + show(): void; + showModal(): void; addEventListener(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } +declare var HTMLDialogElement: { + prototype: HTMLDialogElement; + new(): HTMLDialogElement; +}; + /** @deprecated */ interface HTMLDirectoryElement extends HTMLElement { /** @deprecated */ @@ -7614,6 +7734,7 @@ interface HTMLScriptElement extends HTMLElement { declare var HTMLScriptElement: { prototype: HTMLScriptElement; new(): HTMLScriptElement; + supports(type: string): boolean; }; /** A