diff options
Diffstat (limited to 'cli/tsc/dts')
29 files changed, 990 insertions, 429 deletions
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 7847e4874..21d006fad 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -539,15 +539,15 @@ declare namespace Deno { * * @category FFI */ - export class UnsafeFnPointer<Fn extends ForeignFunction> { + export class UnsafeFnPointer<const Fn extends ForeignFunction> { /** The pointer to the function. */ pointer: PointerObject<Fn>; /** The definition of the function. */ definition: Fn; - constructor(pointer: PointerObject<Fn>, definition: Const<Fn>); + constructor(pointer: PointerObject<NoInfer<Fn>>, definition: Fn); /** @deprecated Properly type {@linkcode pointer} using {@linkcode NativeTypedFunction} or {@linkcode UnsafeCallbackDefinition} types. */ - constructor(pointer: PointerObject, definition: Const<Fn>); + constructor(pointer: PointerObject, definition: Fn); /** Call the foreign function. */ call: FromForeignFunction<Fn>; @@ -606,10 +606,11 @@ declare namespace Deno { * @category FFI */ export class UnsafeCallback< - Definition extends UnsafeCallbackDefinition = UnsafeCallbackDefinition, + const Definition extends UnsafeCallbackDefinition = + UnsafeCallbackDefinition, > { constructor( - definition: Const<Definition>, + definition: Definition, callback: UnsafeCallbackFunction< Definition["parameters"], Definition["result"] @@ -636,7 +637,7 @@ declare namespace Deno { static threadSafe< Definition extends UnsafeCallbackDefinition = UnsafeCallbackDefinition, >( - definition: Const<Definition>, + definition: Definition, callback: UnsafeCallbackFunction< Definition["parameters"], Definition["result"] @@ -701,20 +702,6 @@ declare namespace Deno { close(): void; } - /** - * This magic code used to implement better type hints for {@linkcode Deno.dlopen} - * - * @category FFI - */ - type Cast<A, B> = A extends B ? A : B; - /** @category FFI */ - type Const<T> = Cast< - T, - | (T extends string | number | bigint | boolean ? T : never) - | { [K in keyof T]: Const<T[K]> } - | [] - >; - /** **UNSTABLE**: New API, yet to be vetted. * * Opens an external dynamic library and registers symbols, making foreign @@ -761,9 +748,9 @@ declare namespace Deno { * @tags allow-ffi * @category FFI */ - export function dlopen<S extends ForeignLibraryInterface>( + export function dlopen<const S extends ForeignLibraryInterface>( filename: string | URL, - symbols: Const<S>, + symbols: S, ): DynamicLibrary<S>; /** **UNSTABLE**: New API, yet to be vetted. diff --git a/cli/tsc/dts/lib.dom.asynciterable.d.ts b/cli/tsc/dts/lib.dom.asynciterable.d.ts index 271c60335..3b2458f8d 100644 --- a/cli/tsc/dts/lib.dom.asynciterable.d.ts +++ b/cli/tsc/dts/lib.dom.asynciterable.d.ts @@ -1,9 +1,34 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + /// <reference no-default-lib="true"/> +///////////////////////////// +/// Window Async Iterable APIs +///////////////////////////// + +interface FileSystemDirectoryHandle { + [Symbol.asyncIterator](): AsyncIterableIterator<[string, FileSystemHandle]>; + entries(): AsyncIterableIterator<[string, FileSystemHandle]>; + keys(): AsyncIterableIterator<string>; + values(): AsyncIterableIterator<FileSystemHandle>; +} + interface ReadableStream<R = any> { - [Symbol.asyncIterator](options?: { - preventCancel?: boolean; - }): AsyncIterableIterator<R>; + [Symbol.asyncIterator](options?: { + preventCancel?: boolean; + }): AsyncIterableIterator<R>; } diff --git a/cli/tsc/dts/lib.dom.d.ts b/cli/tsc/dts/lib.dom.d.ts index 59b1b6bb7..fab313d11 100644 --- a/cli/tsc/dts/lib.dom.d.ts +++ b/cli/tsc/dts/lib.dom.d.ts @@ -137,6 +137,7 @@ interface AuthenticationExtensionsClientInputs { appid?: string; credProps?: boolean; hmacCreateSecret?: boolean; + minPinLength?: boolean; } interface AuthenticationExtensionsClientOutputs { @@ -462,7 +463,7 @@ interface ElementDefinitionOptions { } interface EncodedVideoChunkInit { - data: BufferSource; + data: AllowSharedBufferSource; duration?: number; timestamp: number; type: EncodedVideoChunkType; @@ -553,7 +554,6 @@ interface FontFaceDescriptors { stretch?: string; style?: string; unicodeRange?: string; - variant?: string; weight?: string; } @@ -1019,27 +1019,16 @@ interface NavigationPreloadState { headerValue?: string; } -interface NotificationAction { - action: string; - icon?: string; - title: string; -} - interface NotificationOptions { - actions?: NotificationAction[]; badge?: string; body?: string; data?: any; dir?: NotificationDirection; icon?: string; - image?: string; lang?: string; - renotify?: boolean; requireInteraction?: boolean; silent?: boolean | null; tag?: string; - timestamp?: EpochTimeStamp; - vibrate?: VibratePattern; } interface OfflineAudioCompletionEventInit extends EventInit { @@ -1349,16 +1338,21 @@ interface RTCDtlsFingerprint { interface RTCEncodedAudioFrameMetadata { contributingSources?: number[]; + payloadType?: number; + sequenceNumber?: number; synchronizationSource?: number; } interface RTCEncodedVideoFrameMetadata { + contributingSources?: number[]; dependencies?: number[]; frameId?: number; height?: number; + payloadType?: number; spatialIndex?: number; synchronizationSource?: number; temporalIndex?: number; + timestamp?: number; width?: number; } @@ -1434,7 +1428,6 @@ interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats { jitterBufferDelay?: number; jitterBufferEmittedCount?: number; keyFramesDecoded?: number; - kind: string; lastPacketReceivedTimestamp?: DOMHighResTimeStamp; mid?: string; nackCount?: number; @@ -1487,6 +1480,7 @@ interface RTCOutboundRtpStreamStats extends RTCSentRtpStreamStats { retransmittedBytesSent?: number; retransmittedPacketsSent?: number; rid?: string; + rtxSsrc?: number; targetBitrate?: number; totalEncodeTime?: number; totalEncodedBytesTarget?: number; @@ -1607,6 +1601,9 @@ interface RTCSessionDescriptionInit { type: RTCSdpType; } +interface RTCSetParameterOptions { +} + interface RTCStats { id: string; timestamp: DOMHighResTimeStamp; @@ -1689,6 +1686,7 @@ interface RequestInit { method?: string; /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */ mode?: RequestMode; + priority?: RequestPriority; /** A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */ redirect?: RequestRedirect; /** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */ @@ -2005,7 +2003,7 @@ interface VideoDecoderConfig { codedHeight?: number; codedWidth?: number; colorSpace?: VideoColorSpaceInit; - description?: BufferSource; + description?: AllowSharedBufferSource; displayAspectHeight?: number; displayAspectWidth?: number; hardwareAcceleration?: HardwareAcceleration; @@ -2136,7 +2134,7 @@ interface WebTransportOptions { } interface WebTransportSendStreamOptions { - sendOrder?: number | null; + sendOrder?: number; } interface WheelEventInit extends MouseEventInit { @@ -2222,6 +2220,8 @@ interface ARIAMixin { ariaColSpan: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) */ ariaCurrent: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaDescription) */ + ariaDescription: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaDisabled) */ ariaDisabled: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaExpanded) */ @@ -2532,7 +2532,9 @@ declare var AnimationEvent: { }; interface AnimationFrameProvider { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame) */ cancelAnimationFrame(handle: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */ requestAnimationFrame(callback: FrameRequestCallback): number; } @@ -2949,8 +2951,11 @@ declare var AuthenticatorAssertionResponse: { interface AuthenticatorAttestationResponse extends AuthenticatorResponse { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/attestationObject) */ readonly attestationObject: ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/getAuthenticatorData) */ getAuthenticatorData(): ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/getPublicKey) */ getPublicKey(): ArrayBuffer | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/getPublicKeyAlgorithm) */ getPublicKeyAlgorithm(): COSEAlgorithmIdentifier; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/getTransports) */ getTransports(): string[]; @@ -3070,6 +3075,7 @@ declare var BaseAudioContext: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BeforeUnloadEvent) */ interface BeforeUnloadEvent extends Event { + /** @deprecated */ returnValue: any; } @@ -3379,6 +3385,8 @@ interface CSSImportRule extends CSSRule { readonly media: MediaList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/styleSheet) */ readonly styleSheet: CSSStyleSheet | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/supportsText) */ + readonly supportsText: string | null; } declare var CSSImportRule: { @@ -3727,6 +3735,8 @@ interface CSSRule { readonly KEYFRAMES_RULE: 7; readonly KEYFRAME_RULE: 8; readonly SUPPORTS_RULE: 12; + readonly COUNTER_STYLE_RULE: 11; + readonly FONT_FEATURE_VALUES_RULE: 14; } declare var CSSRule: { @@ -3742,6 +3752,8 @@ declare var CSSRule: { readonly KEYFRAMES_RULE: 7; readonly KEYFRAME_RULE: 8; readonly SUPPORTS_RULE: 12; + readonly COUNTER_STYLE_RULE: 11; + readonly FONT_FEATURE_VALUES_RULE: 14; }; /** @@ -3882,6 +3894,8 @@ interface CSSStyleDeclaration { /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/background-size) */ backgroundSize: string; baselineShift: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/baseline-source) */ + baselineSource: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/block-size) */ blockSize: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/border) */ @@ -4091,6 +4105,9 @@ interface CSSStyleDeclaration { cssText: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cursor) */ cursor: string; + cx: string; + cy: string; + d: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/direction) */ direction: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/display) */ @@ -4310,6 +4327,8 @@ interface CSSStyleDeclaration { maskSize: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/mask-type) */ maskType: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/math-depth) */ + mathDepth: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/math-style) */ mathStyle: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/max-block-size) */ @@ -4336,10 +4355,14 @@ interface CSSStyleDeclaration { objectPosition: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/offset) */ offset: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/offset-anchor) */ + offsetAnchor: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/offset-distance) */ offsetDistance: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/offset-path) */ offsetPath: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/offset-position) */ + offsetPosition: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/offset-rotate) */ offsetRotate: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/opacity) */ @@ -4432,6 +4455,7 @@ interface CSSStyleDeclaration { printColorAdjust: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/quotes) */ quotes: string; + r: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/resize) */ resize: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/right) */ @@ -4442,6 +4466,8 @@ interface CSSStyleDeclaration { rowGap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/ruby-position) */ rubyPosition: string; + rx: string; + ry: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/scale) */ scale: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/scroll-behavior) */ @@ -4496,8 +4522,12 @@ interface CSSStyleDeclaration { scrollSnapStop: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) */ scrollSnapType: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/scrollbar-color) */ + scrollbarColor: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter) */ scrollbarGutter: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/scrollbar-width) */ + scrollbarWidth: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold) */ shapeImageThreshold: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/shape-margin) */ @@ -4562,6 +4592,8 @@ interface CSSStyleDeclaration { textUnderlineOffset: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-underline-position) */ textUnderlinePosition: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-wrap) */ + textWrap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/top) */ top: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/touch-action) */ @@ -4590,6 +4622,7 @@ interface CSSStyleDeclaration { unicodeBidi: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/user-select) */ userSelect: string; + vectorEffect: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/vertical-align) */ verticalAlign: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/visibility) */ @@ -4872,7 +4905,11 @@ interface CSSStyleDeclaration { * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/mask-clip) */ webkitMaskClip: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite) */ + /** + * @deprecated This is a legacy alias of `maskComposite`. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/mask-composite) + */ webkitMaskComposite: string; /** * @deprecated This is a legacy alias of `maskImage`. @@ -5002,14 +5039,12 @@ interface CSSStyleDeclaration { wordBreak: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/word-spacing) */ wordSpacing: string; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/overflow-wrap) - */ + /** @deprecated */ wordWrap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/writing-mode) */ writingMode: string; + x: string; + y: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/z-index) */ zIndex: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyPriority) */ @@ -5035,16 +5070,13 @@ declare var CSSStyleDeclaration: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule) */ -interface CSSStyleRule extends CSSRule { - readonly cssRules: CSSRuleList; +interface CSSStyleRule extends CSSGroupingRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/selectorText) */ selectorText: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/style) */ readonly style: CSSStyleDeclaration; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/styleMap) */ readonly styleMap: StylePropertyMap; - deleteRule(index: number): void; - insertRule(rule: string, index?: number): number; } declare var CSSStyleRule: { @@ -5505,10 +5537,20 @@ interface CanvasTextDrawingStyles { font: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontKerning) */ fontKerning: CanvasFontKerning; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontStretch) */ + fontStretch: CanvasFontStretch; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontVariantCaps) */ + fontVariantCaps: CanvasFontVariantCaps; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/letterSpacing) */ + letterSpacing: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textAlign) */ textAlign: CanvasTextAlign; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textBaseline) */ textBaseline: CanvasTextBaseline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textRendering) */ + textRendering: CanvasTextRendering; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/wordSpacing) */ + wordSpacing: string; } interface CanvasTransform { @@ -5832,7 +5874,7 @@ interface CredentialsContainer { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/preventSilentAccess) */ preventSilentAccess(): Promise<void>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/store) */ - store(credential: Credential): Promise<Credential>; + store(credential: Credential): Promise<void>; } declare var CredentialsContainer: { @@ -5895,6 +5937,8 @@ interface CustomElementRegistry { define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/get) */ get(name: string): CustomElementConstructor | undefined; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/getName) */ + getName(constructor: CustomElementConstructor): string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/upgrade) */ upgrade(root: Node): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/whenDefined) */ @@ -7684,6 +7728,7 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, Non * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/attachShadow) */ attachShadow(init: ShadowRootInit): ShadowRoot; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/checkVisibility) */ checkVisibility(options?: CheckVisibilityOptions): boolean; /** * Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise. @@ -7951,7 +7996,7 @@ interface EncodedVideoChunk { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/type) */ readonly type: EncodedVideoChunkType; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/copyTo) */ - copyTo(destination: BufferSource): void; + copyTo(destination: AllowSharedBufferSource): void; } declare var EncodedVideoChunk: { @@ -8329,7 +8374,11 @@ interface FileReader extends EventTarget { abort(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsArrayBuffer) */ readAsArrayBuffer(blob: Blob): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsBinaryString) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsBinaryString) + */ readAsBinaryString(blob: Blob): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsDataURL) */ readAsDataURL(blob: Blob): void; @@ -8540,8 +8589,6 @@ interface FontFace { style: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/unicodeRange) */ unicodeRange: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/variant) */ - variant: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/weight) */ weight: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/load) */ @@ -8676,8 +8723,6 @@ interface Gamepad { readonly buttons: ReadonlyArray<GamepadButton>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Gamepad/connected) */ readonly connected: boolean; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Gamepad/hapticActuators) */ - readonly hapticActuators: ReadonlyArray<GamepadHapticActuator>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Gamepad/id) */ readonly id: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Gamepad/index) */ @@ -8844,6 +8889,7 @@ interface GlobalEventHandlersEventMap { "animationstart": AnimationEvent; "auxclick": MouseEvent; "beforeinput": InputEvent; + "beforetoggle": Event; "blur": FocusEvent; "cancel": Event; "canplay": Event; @@ -8957,8 +9003,10 @@ interface GlobalEventHandlers { onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/auxclick_event) */ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforeinput_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/beforeinput_event) */ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforetoggle_event) */ + onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Fires when the object loses the input focus. * @param ev The focus event. @@ -9096,7 +9144,7 @@ interface GlobalEventHandlers { onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/gotpointercapture_event) */ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/input_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/input_event) */ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/invalid_event) */ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null; @@ -9150,7 +9198,7 @@ interface GlobalEventHandlers { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/loadstart_event) */ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/lostpointercapture_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/lostpointercapture_event) */ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; /** * Fires when the user clicks the object with either mouse button. @@ -9941,6 +9989,7 @@ declare var HTMLDataListElement: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement) */ interface HTMLDetailsElement extends HTMLElement { + name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/open) */ open: boolean; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDetailsElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -10085,6 +10134,7 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit spellcheck: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) */ title: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) */ translate: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/attachInternals) */ attachInternals(): ElementInternals; @@ -10095,7 +10145,7 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover) */ showPopover(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover) */ - togglePopover(force?: boolean): void; + togglePopover(force?: boolean): boolean; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -10830,6 +10880,8 @@ interface HTMLImageElement extends HTMLElement { readonly currentSrc: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/decoding) */ decoding: "async" | "sync" | "auto"; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority) */ + fetchPriority: string; /** * Sets or retrieves the height of the object. * @@ -10964,6 +11016,7 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { /** Sets or retrieves the initial contents of the object. */ defaultValue: string; dirName: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/disabled) */ disabled: boolean; /** * Returns a FileList object on a file type input object. @@ -11009,11 +11062,7 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/height) */ height: number; - /** - * When set, overrides the rendering of checkbox controls so that the current value is not visible. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/indeterminate) - */ + /** When set, overrides the rendering of checkbox controls so that the current value is not visible. */ indeterminate: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/labels) */ readonly labels: NodeListOf<HTMLLabelElement> | null; @@ -11262,9 +11311,19 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/crossOrigin) */ crossOrigin: string | null; disabled: boolean; - /** Sets or retrieves a destination URL or an anchor point. */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/fetchPriority) */ + fetchPriority: string; + /** + * Sets or retrieves a destination URL or an anchor point. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/href) + */ href: string; - /** Sets or retrieves the language code of the object. */ + /** + * Sets or retrieves the language code of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/hreflang) + */ hreflang: string; imageSizes: string; imageSrcset: string; @@ -11507,6 +11566,7 @@ interface HTMLMediaElement extends HTMLElement { preservesPitch: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/readyState) */ readonly readyState: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/remote) */ readonly remote: RemotePlayback; /** * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked. @@ -11521,6 +11581,12 @@ interface HTMLMediaElement extends HTMLElement { */ readonly seeking: boolean; /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/sinkId) + */ + readonly sinkId: string; + /** * The address or URL of the a media resource that is to be considered. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/src) @@ -11553,7 +11619,7 @@ interface HTMLMediaElement extends HTMLElement { */ load(): void; /** - * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not. + * Pauses the current playback and sets paused to TRUE. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/pause) */ @@ -11570,6 +11636,12 @@ interface HTMLMediaElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setMediaKeys) */ setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>; + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setSinkId) + */ + setSinkId(sinkId: string): Promise<void>; readonly NETWORK_EMPTY: 0; readonly NETWORK_IDLE: 1; readonly NETWORK_LOADING: 2; @@ -12043,6 +12115,7 @@ declare var HTMLOptionsCollection: { }; interface HTMLOrSVGElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) */ autofocus: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) */ readonly dataset: DOMStringMap; @@ -12293,6 +12366,7 @@ interface HTMLScriptElement extends HTMLElement { * @deprecated */ charset: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/crossOrigin) */ crossOrigin: string | null; /** Sets or retrieves the status of the script. */ defer: boolean; @@ -12301,6 +12375,7 @@ interface HTMLScriptElement extends HTMLElement { * @deprecated */ event: string; + fetchPriority: string; /** * Sets or retrieves the object that is bound to the event script. * @deprecated @@ -12467,6 +12542,8 @@ interface HTMLSelectElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/setCustomValidity) */ setCustomValidity(error: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/showPicker) */ + showPicker(): void; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -13120,6 +13197,7 @@ interface HTMLTemplateElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/content) */ readonly content: DocumentFragment; + shadowRootMode: string; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -13460,6 +13538,30 @@ declare var Headers: { new(init?: HeadersInit): Headers; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight) */ +interface Highlight { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/priority) */ + priority: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/type) */ + type: HighlightType; + forEach(callbackfn: (value: AbstractRange, key: AbstractRange, parent: Highlight) => void, thisArg?: any): void; +} + +declare var Highlight: { + prototype: Highlight; + new(...initialRanges: AbstractRange[]): Highlight; +}; + +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HighlightRegistry) */ +interface HighlightRegistry { + forEach(callbackfn: (value: Highlight, key: string, parent: HighlightRegistry) => void, thisArg?: any): void; +} + +declare var HighlightRegistry: { + prototype: HighlightRegistry; + new(): HighlightRegistry; +}; + /** * Allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in. * @@ -14411,7 +14513,11 @@ interface KeyboardEvent extends UIEvent { readonly shiftKey: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/getModifierState) */ getModifierState(keyArg: string): boolean; - /** @deprecated */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/initKeyboardEvent) + */ initKeyboardEvent(typeArg: string, bubblesArg?: boolean, cancelableArg?: boolean, viewArg?: Window | null, keyArg?: string, locationArg?: number, ctrlKey?: boolean, altKey?: boolean, shiftKey?: boolean, metaKey?: boolean): void; readonly DOM_KEY_LOCATION_STANDARD: 0x00; readonly DOM_KEY_LOCATION_LEFT: 0x01; @@ -14634,7 +14740,7 @@ declare var MIDIAccess: { */ interface MIDIConnectionEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIConnectionEvent/port) */ - readonly port: MIDIPort; + readonly port: MIDIPort | null; } declare var MIDIConnectionEvent: { @@ -14643,7 +14749,7 @@ declare var MIDIConnectionEvent: { }; interface MIDIInputEventMap extends MIDIPortEventMap { - "midimessage": Event; + "midimessage": MIDIMessageEvent; } /** @@ -14653,7 +14759,7 @@ interface MIDIInputEventMap extends MIDIPortEventMap { */ interface MIDIInput extends MIDIPort { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIInput/midimessage_event) */ - onmidimessage: ((this: MIDIInput, ev: Event) => any) | null; + onmidimessage: ((this: MIDIInput, ev: MIDIMessageEvent) => any) | null; addEventListener<K extends keyof MIDIInputEventMap>(type: K, listener: (this: MIDIInput, ev: MIDIInputEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof MIDIInputEventMap>(type: K, listener: (this: MIDIInput, ev: MIDIInputEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -14686,7 +14792,7 @@ declare var MIDIInputMap: { */ interface MIDIMessageEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIMessageEvent/data) */ - readonly data: Uint8Array; + readonly data: Uint8Array | null; } declare var MIDIMessageEvent: { @@ -14728,7 +14834,7 @@ declare var MIDIOutputMap: { }; interface MIDIPortEventMap { - "statechange": Event; + "statechange": MIDIConnectionEvent; } /** @@ -14746,7 +14852,7 @@ interface MIDIPort extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIPort/name) */ readonly name: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIPort/statechange_event) */ - onstatechange: ((this: MIDIPort, ev: Event) => any) | null; + onstatechange: ((this: MIDIPort, ev: MIDIConnectionEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIPort/state) */ readonly state: MIDIPortDeviceState; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIPort/type) */ @@ -15598,6 +15704,10 @@ interface MouseEvent extends UIEvent { readonly clientY: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/ctrlKey) */ readonly ctrlKey: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/layerX) */ + readonly layerX: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/layerY) */ + readonly layerY: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/metaKey) */ readonly metaKey: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/movementX) */ @@ -16383,6 +16493,8 @@ interface NotificationEventMap { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification) */ interface Notification extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/badge) */ + readonly badge: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/body) */ readonly body: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/data) */ @@ -16401,6 +16513,8 @@ interface Notification extends EventTarget { onerror: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */ onshow: ((this: Notification, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requireInteraction) */ + readonly requireInteraction: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */ readonly silent: boolean | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */ @@ -16668,7 +16782,7 @@ declare var OscillatorNode: { }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OverconstrainedError) */ -interface OverconstrainedError extends Error { +interface OverconstrainedError extends DOMException { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OverconstrainedError/constraint) */ readonly constraint: string; } @@ -17611,6 +17725,7 @@ interface PointerEvent extends MouseEvent { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/getCoalescedEvents) */ getCoalescedEvents(): PointerEvent[]; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/getPredictedEvents) */ getPredictedEvents(): PointerEvent[]; } @@ -17712,6 +17827,7 @@ interface PublicKeyCredential extends Credential { declare var PublicKeyCredential: { prototype: PublicKeyCredential; new(): PublicKeyCredential; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isConditionalMediationAvailable) */ isConditionalMediationAvailable(): Promise<boolean>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable_static) */ isUserVerifyingPlatformAuthenticatorAvailable(): Promise<boolean>; @@ -17936,9 +18052,13 @@ declare var RTCDtlsTransport: { new(): RTCDtlsTransport; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame) */ interface RTCEncodedAudioFrame { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/data) */ data: ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/timestamp) */ readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/getMetadata) */ getMetadata(): RTCEncodedAudioFrameMetadata; } @@ -17947,10 +18067,15 @@ declare var RTCEncodedAudioFrame: { new(): RTCEncodedAudioFrame; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame) */ interface RTCEncodedVideoFrame { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/data) */ data: ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/timestamp) */ readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/type) */ readonly type: RTCEncodedVideoFrameType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/getMetadata) */ getMetadata(): RTCEncodedVideoFrameMetadata; } @@ -18071,7 +18196,7 @@ interface RTCPeerConnectionEventMap { "connectionstatechange": Event; "datachannel": RTCDataChannelEvent; "icecandidate": RTCPeerConnectionIceEvent; - "icecandidateerror": Event; + "icecandidateerror": RTCPeerConnectionIceErrorEvent; "iceconnectionstatechange": Event; "icegatheringstatechange": Event; "negotiationneeded": Event; @@ -18106,7 +18231,7 @@ interface RTCPeerConnection extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/icecandidate_event) */ onicecandidate: ((this: RTCPeerConnection, ev: RTCPeerConnectionIceEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/icecandidateerror_event) */ - onicecandidateerror: ((this: RTCPeerConnection, ev: Event) => any) | null; + onicecandidateerror: ((this: RTCPeerConnection, ev: RTCPeerConnectionIceErrorEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/iceconnectionstatechange_event) */ oniceconnectionstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/icegatheringstatechange_event) */ @@ -18225,6 +18350,8 @@ declare var RTCPeerConnectionIceEvent: { interface RTCRtpReceiver { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/track) */ readonly track: MediaStreamTrack; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/transform) */ + transform: RTCRtpTransform | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/transport) */ readonly transport: RTCDtlsTransport | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/getContributingSources) */ @@ -18244,6 +18371,15 @@ declare var RTCRtpReceiver: { getCapabilities(kind: string): RTCRtpCapabilities | null; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransform) */ +interface RTCRtpScriptTransform { +} + +declare var RTCRtpScriptTransform: { + prototype: RTCRtpScriptTransform; + new(worker: Worker, options?: any, transfer?: any[]): RTCRtpScriptTransform; +}; + /** * Provides the ability to control and obtain details about how a particular MediaStreamTrack is encoded and sent to a remote peer. * @@ -18254,6 +18390,8 @@ interface RTCRtpSender { readonly dtmf: RTCDTMFSender | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/track) */ readonly track: MediaStreamTrack | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/transform) */ + transform: RTCRtpTransform | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/transport) */ readonly transport: RTCDtlsTransport | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/getParameters) */ @@ -18263,7 +18401,7 @@ interface RTCRtpSender { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/replaceTrack) */ replaceTrack(withTrack: MediaStreamTrack | null): Promise<void>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/setParameters) */ - setParameters(parameters: RTCRtpSendParameters): Promise<void>; + setParameters(parameters: RTCRtpSendParameters, setParameterOptions?: RTCSetParameterOptions): Promise<void>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/setStreams) */ setStreams(...streams: MediaStream[]): void; } @@ -20035,6 +20173,8 @@ declare var SVGGraphicsElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGImageElement) */ interface SVGImageElement extends SVGGraphicsElement, SVGURIReference { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGImageElement/crossorigin) */ + crossOrigin: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGImageElement/height) */ readonly height: SVGAnimatedLength; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGImageElement/preserveAspectRatio) */ @@ -21178,6 +21318,7 @@ interface ServiceWorkerContainer extends EventTarget { oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/message_event) */ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/messageerror_event) */ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/ready) */ readonly ready: Promise<ServiceWorkerRegistration>; @@ -22034,6 +22175,24 @@ interface TextMetrics { /** * Returns the measurement described below. * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/alphabeticBaseline) + */ + readonly alphabeticBaseline: number; + /** + * Returns the measurement described below. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/emHeightAscent) + */ + readonly emHeightAscent: number; + /** + * Returns the measurement described below. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/emHeightDescent) + */ + readonly emHeightDescent: number; + /** + * Returns the measurement described below. + * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxAscent) */ readonly fontBoundingBoxAscent: number; @@ -22046,6 +22205,18 @@ interface TextMetrics { /** * Returns the measurement described below. * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/hangingBaseline) + */ + readonly hangingBaseline: number; + /** + * Returns the measurement described below. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/ideographicBaseline) + */ + readonly ideographicBaseline: number; + /** + * Returns the measurement described below. + * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/width) */ readonly width: number; @@ -22854,13 +23025,13 @@ interface VideoFrame { clone(): VideoFrame; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/close) */ close(): void; - copyTo(destination: BufferSource, options?: VideoFrameCopyToOptions): Promise<PlaneLayout[]>; + copyTo(destination: AllowSharedBufferSource, options?: VideoFrameCopyToOptions): Promise<PlaneLayout[]>; } declare var VideoFrame: { prototype: VideoFrame; new(image: CanvasImageSource, init?: VideoFrameInit): VideoFrame; - new(data: BufferSource, init: VideoFrameBufferInit): VideoFrame; + new(data: AllowSharedBufferSource, init: VideoFrameBufferInit): VideoFrame; }; /** @@ -23088,13 +23259,13 @@ interface WEBGL_lose_context { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw) */ interface WEBGL_multi_draw { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } /** @@ -23177,7 +23348,6 @@ declare var WebGL2RenderingContext: { readonly STENCIL: 0x1802; readonly RED: 0x1903; readonly RGB8: 0x8051; - readonly RGBA8: 0x8058; readonly RGB10_A2: 0x8059; readonly TEXTURE_BINDING_3D: 0x806A; readonly UNPACK_SKIP_IMAGES: 0x806D; @@ -23688,6 +23858,7 @@ declare var WebGL2RenderingContext: { readonly RENDERBUFFER: 0x8D41; readonly RGBA4: 0x8056; readonly RGB5_A1: 0x8057; + readonly RGBA8: 0x8058; readonly RGB565: 0x8D62; readonly DEPTH_COMPONENT16: 0x81A5; readonly STENCIL_INDEX8: 0x8D48; @@ -23746,19 +23917,19 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void; + clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void; + clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clientWaitSync) */ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexImage3D) */ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void; - compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; + compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexSubImage3D) */ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void; - compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; + compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/copyBufferSubData) */ copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/copyTexSubImage3D) */ @@ -23804,7 +23975,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getBufferSubData) */ - getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void; + getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getFragDataLocation) */ getFragDataLocation(program: WebGLProgram, name: string): GLint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getIndexedParameter) */ @@ -23855,7 +24026,7 @@ interface WebGL2RenderingContextBase { texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void; texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void; - texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void; + texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texStorage2D) */ texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texStorage3D) */ @@ -23863,39 +24034,39 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texSubImage3D) */ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void; texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; - texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: GLuint): void; + texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformBlockBinding) */ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribDivisor) */ vertexAttribDivisor(index: GLuint, divisor: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ @@ -23922,7 +24093,6 @@ interface WebGL2RenderingContextBase { readonly STENCIL: 0x1802; readonly RED: 0x1903; readonly RGB8: 0x8051; - readonly RGBA8: 0x8058; readonly RGB10_A2: 0x8059; readonly TEXTURE_BINDING_3D: 0x806A; readonly UNPACK_SKIP_IMAGES: 0x806D; @@ -24178,55 +24348,55 @@ interface WebGL2RenderingContextBase { interface WebGL2RenderingContextOverloads { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferData) */ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void; - bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void; - bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void; + bufferData(target: GLenum, srcData: AllowSharedBufferSource | null, usage: GLenum): void; + bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferSubData) */ - bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void; - bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void; + bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: AllowSharedBufferSource): void; + bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void; - compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; + compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexSubImage2D) */ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void; - compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; + compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/readPixels) */ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void; readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void; - readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void; + readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texImage2D) */ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void; texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; - texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void; + texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texSubImage2D) */ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; - texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void; + texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; } /** @@ -24595,6 +24765,7 @@ declare var WebGLRenderingContext: { readonly RENDERBUFFER: 0x8D41; readonly RGBA4: 0x8056; readonly RGB5_A1: 0x8057; + readonly RGBA8: 0x8058; readonly RGB565: 0x8D62; readonly DEPTH_COMPONENT16: 0x81A5; readonly STENCIL_INDEX8: 0x8D48; @@ -25170,6 +25341,7 @@ interface WebGLRenderingContextBase { readonly RENDERBUFFER: 0x8D41; readonly RGBA4: 0x8056; readonly RGB5_A1: 0x8057; + readonly RGBA8: 0x8058; readonly RGB565: 0x8D62; readonly DEPTH_COMPONENT16: 0x81A5; readonly STENCIL_INDEX8: 0x8D48; @@ -25211,9 +25383,9 @@ interface WebGLRenderingContextBase { interface WebGLRenderingContextOverloads { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferData) */ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void; - bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void; + bufferData(target: GLenum, data: AllowSharedBufferSource | null, usage: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferSubData) */ - bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void; + bufferSubData(target: GLenum, offset: GLintptr, data: AllowSharedBufferSource): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexSubImage2D) */ @@ -25495,13 +25667,13 @@ interface WebTransportDatagramDuplexStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark) */ incomingHighWaterMark: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge) */ - incomingMaxAge: number; + incomingMaxAge: number | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize) */ readonly maxDatagramSize: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark) */ outgoingHighWaterMark: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge) */ - outgoingMaxAge: number; + outgoingMaxAge: number | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/readable) */ readonly readable: ReadableStream; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable) */ @@ -25561,6 +25733,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler "DOMContentLoaded": Event; "devicemotion": DeviceMotionEvent; "deviceorientation": DeviceOrientationEvent; + "deviceorientationabsolute": DeviceOrientationEvent; "gamepadconnected": GamepadEvent; "gamepaddisconnected": GamepadEvent; "orientationchange": Event; @@ -25650,6 +25823,12 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler */ ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null; /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/deviceorientationabsolute_event) + */ + ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null; + /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/orientationchange_event) @@ -25893,7 +26072,11 @@ interface WindowEventHandlers { onstorage: ((this: WindowEventHandlers, ev: StorageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */ onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event) + */ onunload: ((this: WindowEventHandlers, ev: Event) => any) | null; addEventListener<K extends keyof WindowEventHandlersEventMap>(type: K, listener: (this: WindowEventHandlers, ev: WindowEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -26428,44 +26611,44 @@ declare var XSLTProcessor: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */ interface Console { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/assert) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/assert_static) */ assert(condition?: boolean, ...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */ clear(): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */ count(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */ countReset(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */ debug(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */ dir(item?: any, options?: any): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */ dirxml(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */ error(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */ group(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */ groupCollapsed(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */ groupEnd(): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */ info(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */ log(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */ table(tabularData?: any, properties?: string[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */ time(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */ timeEnd(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */ timeLog(label?: string, ...data: any[]): void; timeStamp(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */ trace(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */ warn(...data: any[]): void; } @@ -26473,10 +26656,13 @@ declare var console: Console; /** Holds useful CSS-related methods. No object with this interface are implemented: it contains only static methods and therefore is a utilitarian interface. */ declare namespace CSS { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/highlights_static) */ + var highlights: HighlightRegistry; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function Hz(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function Q(value: number): CSSUnitValue; + function cap(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function ch(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ @@ -26523,8 +26709,10 @@ declare namespace CSS { function fr(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function grad(value: number): CSSUnitValue; + function ic(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function kHz(value: number): CSSUnitValue; + function lh(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvb(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ @@ -26553,10 +26741,15 @@ declare namespace CSS { function px(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function rad(value: number): CSSUnitValue; + function rcap(value: number): CSSUnitValue; + function rch(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/registerProperty_static) */ function registerProperty(definition: PropertyDefinition): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function rem(value: number): CSSUnitValue; + function rex(value: number): CSSUnitValue; + function ric(value: number): CSSUnitValue; + function rlh(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function s(value: number): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/supports_static) */ @@ -26600,11 +26793,11 @@ declare namespace WebAssembly { (message?: string): CompileError; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global) */ interface Global<T extends ValueType = ValueType> { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/value) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global/value) */ value: ValueTypeMap[T]; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/valueOf) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global/valueOf) */ valueOf(): ValueTypeMap[T]; } @@ -26613,9 +26806,9 @@ declare namespace WebAssembly { new<T extends ValueType = ValueType>(descriptor: GlobalDescriptor<T>, v?: ValueTypeMap[T]): Global<T>; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Instance) */ interface Instance { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance/exports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Instance/exports) */ readonly exports: Exports; } @@ -26633,11 +26826,11 @@ declare namespace WebAssembly { (message?: string): LinkError; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory) */ interface Memory { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory/buffer) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory/buffer) */ readonly buffer: ArrayBuffer; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory/grow) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory/grow) */ grow(delta: number): number; } @@ -26646,18 +26839,18 @@ declare namespace WebAssembly { new(descriptor: MemoryDescriptor): Memory; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module) */ interface Module { } var Module: { prototype: Module; new(bytes: BufferSource): Module; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module/customSections) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/customSections_static) */ customSections(moduleObject: Module, sectionName: string): ArrayBuffer[]; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module/exports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/exports_static) */ exports(moduleObject: Module): ModuleExportDescriptor[]; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module/imports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/imports_static) */ imports(moduleObject: Module): ModuleImportDescriptor[]; }; @@ -26670,15 +26863,15 @@ declare namespace WebAssembly { (message?: string): RuntimeError; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table) */ interface Table { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/length) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/length) */ readonly length: number; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/get) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/get) */ get(index: number): any; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/grow) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/grow) */ grow(delta: number, value?: any): number; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/set) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/set) */ set(index: number, value?: any): void; } @@ -26738,16 +26931,16 @@ declare namespace WebAssembly { type Imports = Record<string, ModuleImports>; type ModuleImports = Record<string, ImportValue>; type ValueType = keyof ValueTypeMap; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/compile_static) */ function compile(bytes: BufferSource): Promise<Module>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/compileStreaming_static) */ function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/instantiate_static) */ function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>; function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/instantiateStreaming_static) */ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/validate) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/validate_static) */ function validate(bytes: BufferSource): boolean; } @@ -27255,6 +27448,12 @@ declare var ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | nul */ declare var ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null; /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/deviceorientationabsolute_event) + */ +declare var ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null; +/** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/orientationchange_event) @@ -27437,7 +27636,9 @@ declare function toString(): string; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) */ declare function dispatchEvent(event: Event): boolean; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame) */ declare function cancelAnimationFrame(handle: number): void; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */ declare function requestAnimationFrame(callback: FrameRequestCallback): number; /** * Fires when the user aborts the download. @@ -27456,8 +27657,10 @@ declare var onanimationiteration: ((this: Window, ev: AnimationEvent) => any) | declare var onanimationstart: ((this: Window, ev: AnimationEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/auxclick_event) */ declare var onauxclick: ((this: Window, ev: MouseEvent) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforeinput_event) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/beforeinput_event) */ declare var onbeforeinput: ((this: Window, ev: InputEvent) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforetoggle_event) */ +declare var onbeforetoggle: ((this: Window, ev: Event) => any) | null; /** * Fires when the object loses the input focus. * @param ev The focus event. @@ -27595,7 +27798,7 @@ declare var onfocus: ((this: Window, ev: FocusEvent) => any) | null; declare var onformdata: ((this: Window, ev: FormDataEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/gotpointercapture_event) */ declare var ongotpointercapture: ((this: Window, ev: PointerEvent) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/input_event) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/input_event) */ declare var oninput: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/invalid_event) */ declare var oninvalid: ((this: Window, ev: Event) => any) | null; @@ -27649,7 +27852,7 @@ declare var onloadedmetadata: ((this: Window, ev: Event) => any) | null; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/loadstart_event) */ declare var onloadstart: ((this: Window, ev: Event) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/lostpointercapture_event) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/lostpointercapture_event) */ declare var onlostpointercapture: ((this: Window, ev: PointerEvent) => any) | null; /** * Fires when the user clicks the object with either mouse button. @@ -27905,7 +28108,11 @@ declare var onrejectionhandled: ((this: Window, ev: PromiseRejectionEvent) => an declare var onstorage: ((this: Window, ev: StorageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) */ declare var onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event) */ +/** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/unload_event) + */ declare var onunload: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/localStorage) */ declare var localStorage: Storage; @@ -28014,6 +28221,7 @@ type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type OptionalPostfixToken<T extends string> = ` ${T}` | ""; type OptionalPrefixToken<T extends string> = `${T} ` | ""; type PerformanceEntryList = PerformanceEntry[]; +type RTCRtpTransform = RTCRtpScriptTransform; type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController; type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>; type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader; @@ -28093,6 +28301,7 @@ type GamepadMappingType = "" | "standard" | "xr-standard"; type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; +type HighlightType = "grammar-error" | "highlight" | "spelling-error"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "done" | "pending"; type IDBTransactionDurability = "default" | "relaxed" | "strict"; @@ -28162,7 +28371,7 @@ type RTCSctpTransportState = "closed" | "connected" | "connecting"; type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback"; type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable"; type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "inprogress" | "succeeded" | "waiting"; -type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "transport"; +type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-playout" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "transport"; type ReadableStreamReaderMode = "byob"; type ReadableStreamType = "bytes"; type ReadyState = "closed" | "ended" | "open"; @@ -28173,6 +28382,7 @@ type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only- type RequestCredentials = "include" | "omit" | "same-origin"; type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt"; type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin"; +type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResidentKeyRequirement = "discouraged" | "preferred" | "required"; type ResizeObserverBoxOptions = "border-box" | "content-box" | "device-pixel-content-box"; diff --git a/cli/tsc/dts/lib.dom.iterable.d.ts b/cli/tsc/dts/lib.dom.iterable.d.ts index 2460ef5fd..85ad944a7 100644 --- a/cli/tsc/dts/lib.dom.iterable.d.ts +++ b/cli/tsc/dts/lib.dom.iterable.d.ts @@ -152,6 +152,12 @@ interface Headers { values(): IterableIterator<string>; } +interface Highlight extends Set<AbstractRange> { +} + +interface HighlightRegistry extends Map<string, Highlight> { +} + interface IDBDatabase { /** * Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. @@ -305,6 +311,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */ + generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>; @@ -344,22 +351,22 @@ interface WEBGL_draw_buffers { interface WEBGL_multi_draw { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: number, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: number, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: number, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: number, drawcount: GLsizei): void; } interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void; + clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void; + clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ drawBuffers(buffers: Iterable<GLenum>): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ @@ -373,25 +380,25 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ @@ -400,27 +407,27 @@ interface WebGL2RenderingContextBase { interface WebGL2RenderingContextOverloads { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; } interface WebGLRenderingContextBase { diff --git a/cli/tsc/dts/lib.es2016.d.ts b/cli/tsc/dts/lib.es2016.d.ts index 5ba3f865f..f8a2c7d50 100644 --- a/cli/tsc/dts/lib.es2016.d.ts +++ b/cli/tsc/dts/lib.es2016.d.ts @@ -18,3 +18,4 @@ and limitations under the License. /// <reference lib="es2015" /> /// <reference lib="es2016.array.include" /> +/// <reference lib="es2016.intl" /> diff --git a/cli/tsc/dts/lib.es2016.intl.d.ts b/cli/tsc/dts/lib.es2016.intl.d.ts new file mode 100644 index 000000000..7af6efc2b --- /dev/null +++ b/cli/tsc/dts/lib.es2016.intl.d.ts @@ -0,0 +1,31 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// <reference no-default-lib="true"/> + +declare namespace Intl { + /** + * The `Intl.getCanonicalLocales()` method returns an array containing + * the canonical locale names. Duplicates will be omitted and elements + * will be validated as structurally valid language tags. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) + * + * @param locale A list of String values for which to get the canonical locale names + * @returns An array containing the canonical and validated locale names. + */ + function getCanonicalLocales(locale?: string | readonly string[]): string[]; +} diff --git a/cli/tsc/dts/lib.es2018.full.d.ts b/cli/tsc/dts/lib.es2018.full.d.ts index 35ed44f0e..49b370aa9 100644 --- a/cli/tsc/dts/lib.es2018.full.d.ts +++ b/cli/tsc/dts/lib.es2018.full.d.ts @@ -21,3 +21,4 @@ and limitations under the License. /// <reference lib="webworker.importscripts" /> /// <reference lib="scripthost" /> /// <reference lib="dom.iterable" /> +/// <reference lib="dom.asynciterable" /> diff --git a/cli/tsc/dts/lib.es2018.intl.d.ts b/cli/tsc/dts/lib.es2018.intl.d.ts index da34dae58..8517ba938 100644 --- a/cli/tsc/dts/lib.es2018.intl.d.ts +++ b/cli/tsc/dts/lib.es2018.intl.d.ts @@ -47,12 +47,13 @@ declare namespace Intl { select(n: number): LDMLPluralRule; } - const PluralRules: { - new (locales?: string | string[], options?: PluralRulesOptions): PluralRules; - (locales?: string | string[], options?: PluralRulesOptions): PluralRules; + interface PluralRulesConstructor { + new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules; + supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; + } - supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; - }; + const PluralRules: PluralRulesConstructor; // We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here: type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name"; diff --git a/cli/tsc/dts/lib.es2019.full.d.ts b/cli/tsc/dts/lib.es2019.full.d.ts index e3ae1a6a1..e36572f3e 100644 --- a/cli/tsc/dts/lib.es2019.full.d.ts +++ b/cli/tsc/dts/lib.es2019.full.d.ts @@ -21,3 +21,4 @@ and limitations under the License. /// <reference lib="webworker.importscripts" /> /// <reference lib="scripthost" /> /// <reference lib="dom.iterable" /> +/// <reference lib="dom.asynciterable" /> diff --git a/cli/tsc/dts/lib.es2020.full.d.ts b/cli/tsc/dts/lib.es2020.full.d.ts index 5fa8b55c5..1d69cc06b 100644 --- a/cli/tsc/dts/lib.es2020.full.d.ts +++ b/cli/tsc/dts/lib.es2020.full.d.ts @@ -21,3 +21,4 @@ and limitations under the License. /// <reference lib="webworker.importscripts" /> /// <reference lib="scripthost" /> /// <reference lib="dom.iterable" /> +/// <reference lib="dom.asynciterable" /> diff --git a/cli/tsc/dts/lib.es2020.intl.d.ts b/cli/tsc/dts/lib.es2020.intl.d.ts index 9c41b38b2..59c0d7ebd 100644 --- a/cli/tsc/dts/lib.es2020.intl.d.ts +++ b/cli/tsc/dts/lib.es2020.intl.d.ts @@ -19,9 +19,11 @@ and limitations under the License. /// <reference lib="es2018.intl" /> declare namespace Intl { /** - * [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition. + * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier). * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * For example: "fa", "es-MX", "zh-Hant-TW". + * + * See [MDN - Intl - locales argument](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). */ type UnicodeBCP47LocaleIdentifier = string; @@ -89,16 +91,9 @@ declare namespace Intl { type RelativeTimeFormatStyle = "long" | "short" | "narrow"; /** - * [BCP 47 language tag](http://tools.ietf.org/html/rfc5646) definition. + * The locale or locales to use * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - */ - type BCP47LanguageTag = string; - - /** - * The locale(s) to use - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * See [MDN - Intl - locales argument](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). */ type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; @@ -218,7 +213,7 @@ declare namespace Intl { * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). */ new ( - locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[], + locales?: LocalesArgument, options?: RelativeTimeFormatOptions, ): RelativeTimeFormat; @@ -241,7 +236,7 @@ declare namespace Intl { * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). */ supportedLocalesOf( - locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[], + locales?: LocalesArgument, options?: RelativeTimeFormatOptions, ): UnicodeBCP47LocaleIdentifier[]; }; @@ -312,7 +307,7 @@ declare namespace Intl { /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ minimize(): Locale; /** Returns the locale's full locale identifier string. */ - toString(): BCP47LanguageTag; + toString(): UnicodeBCP47LocaleIdentifier; } /** @@ -330,7 +325,7 @@ declare namespace Intl { * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). */ const Locale: { - new (tag: BCP47LanguageTag | Locale, options?: LocaleOptions): Locale; + new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale; }; type DisplayNamesFallback = @@ -424,6 +419,31 @@ declare namespace Intl { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). */ - supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): BCP47LanguageTag[]; + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[]; }; + + interface CollatorConstructor { + new (locales?: LocalesArgument, options?: CollatorOptions): Collator; + (locales?: LocalesArgument, options?: CollatorOptions): Collator; + supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[]; + } + + interface DateTimeFormatConstructor { + new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat; + supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[]; + } + + interface NumberFormatConstructor { + new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat; + supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[]; + } + + interface PluralRulesConstructor { + new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; + + supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; + } } diff --git a/cli/tsc/dts/lib.es2020.string.d.ts b/cli/tsc/dts/lib.es2020.string.d.ts index ed6a7ff4e..17c15806e 100644 --- a/cli/tsc/dts/lib.es2020.string.d.ts +++ b/cli/tsc/dts/lib.es2020.string.d.ts @@ -24,5 +24,19 @@ interface String { * containing the results of that search. * @param regexp A variable name or string literal containing the regular expression pattern and flags. */ - matchAll(regexp: RegExp): IterableIterator<RegExpMatchArray>; + matchAll(regexp: RegExp): IterableIterator<RegExpExecArray>; + + /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ + toLocaleLowerCase(locales?: Intl.LocalesArgument): string; + + /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ + toLocaleUpperCase(locales?: Intl.LocalesArgument): string; + + /** + * Determines whether two strings are equivalent in the current or specified locale. + * @param that String to compare to target string + * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + */ + localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; } diff --git a/cli/tsc/dts/lib.es2021.full.d.ts b/cli/tsc/dts/lib.es2021.full.d.ts index dd10e3ef1..2a2772a42 100644 --- a/cli/tsc/dts/lib.es2021.full.d.ts +++ b/cli/tsc/dts/lib.es2021.full.d.ts @@ -21,3 +21,4 @@ and limitations under the License. /// <reference lib="webworker.importscripts" /> /// <reference lib="scripthost" /> /// <reference lib="dom.iterable" /> +/// <reference lib="dom.asynciterable" /> diff --git a/cli/tsc/dts/lib.es2021.intl.d.ts b/cli/tsc/dts/lib.es2021.intl.d.ts index b464d55d6..ec90ad1b2 100644 --- a/cli/tsc/dts/lib.es2021.intl.d.ts +++ b/cli/tsc/dts/lib.es2021.intl.d.ts @@ -143,7 +143,7 @@ declare namespace Intl { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). */ - new (locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: ListFormatOptions): ListFormat; + new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; /** * Returns an array containing those of the provided locales that are @@ -161,6 +161,6 @@ declare namespace Intl { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). */ - supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<ListFormatOptions, "localeMatcher">): BCP47LanguageTag[]; + supportedLocalesOf(locales: LocalesArgument, options?: Pick<ListFormatOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[]; }; } diff --git a/cli/tsc/dts/lib.es2021.promise.d.ts b/cli/tsc/dts/lib.es2021.promise.d.ts index 5ec1f5f7b..fb9bdf261 100644 --- a/cli/tsc/dts/lib.es2021.promise.d.ts +++ b/cli/tsc/dts/lib.es2021.promise.d.ts @@ -45,10 +45,4 @@ interface PromiseConstructor { * @returns A new Promise. */ any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>; - - /** - * Creates a Promise that can be resolved or rejected using provided functions. - * @returns An object containing `promise` promise object, `resolve` and `reject` functions. - */ - withResolvers<T>(): { promise: Promise<T>, resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void }; } diff --git a/cli/tsc/dts/lib.es2022.full.d.ts b/cli/tsc/dts/lib.es2022.full.d.ts index 12c8d7377..a49d1b381 100644 --- a/cli/tsc/dts/lib.es2022.full.d.ts +++ b/cli/tsc/dts/lib.es2022.full.d.ts @@ -21,3 +21,4 @@ and limitations under the License. /// <reference lib="webworker.importscripts" /> /// <reference lib="scripthost" /> /// <reference lib="dom.iterable" /> +/// <reference lib="dom.asynciterable" /> diff --git a/cli/tsc/dts/lib.es2022.intl.d.ts b/cli/tsc/dts/lib.es2022.intl.d.ts index c41f999f1..6a2ba0787 100644 --- a/cli/tsc/dts/lib.es2022.intl.d.ts +++ b/cli/tsc/dts/lib.es2022.intl.d.ts @@ -89,7 +89,7 @@ declare namespace Intl { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). */ - new (locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: SegmenterOptions): Segmenter; + new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter; /** * Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale. @@ -103,7 +103,7 @@ declare namespace Intl { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) */ - supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<SegmenterOptions, "localeMatcher">): BCP47LanguageTag[]; + supportedLocalesOf(locales: LocalesArgument, options?: Pick<SegmenterOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[]; }; /** diff --git a/cli/tsc/dts/lib.es2023.full.d.ts b/cli/tsc/dts/lib.es2023.full.d.ts index 5cdfd5ca8..bb26644e8 100644 --- a/cli/tsc/dts/lib.es2023.full.d.ts +++ b/cli/tsc/dts/lib.es2023.full.d.ts @@ -21,3 +21,4 @@ and limitations under the License. /// <reference lib="webworker.importscripts" /> /// <reference lib="scripthost" /> /// <reference lib="dom.iterable" /> +/// <reference lib="dom.asynciterable" /> diff --git a/cli/tsc/dts/lib.es5.d.ts b/cli/tsc/dts/lib.es5.d.ts index 439ed6b81..dee445d07 100644 --- a/cli/tsc/dts/lib.es5.d.ts +++ b/cli/tsc/dts/lib.es5.d.ts @@ -644,6 +644,7 @@ interface ImportCallOptions { /** * The type for the `assert` property of the optional second argument to `import()`. + * @deprecated */ interface ImportAssertions { [key: string]: string; @@ -1667,6 +1668,11 @@ type Capitalize<S extends string> = intrinsic; type Uncapitalize<S extends string> = intrinsic; /** + * Marker for non-inference type position + */ +type NoInfer<T> = intrinsic; + +/** * Marker for contextual 'this' type */ interface ThisType<T> {} @@ -4418,11 +4424,14 @@ declare namespace Intl { compare(x: string, y: string): number; resolvedOptions(): ResolvedCollatorOptions; } - var Collator: { + + interface CollatorConstructor { new (locales?: string | string[], options?: CollatorOptions): Collator; (locales?: string | string[], options?: CollatorOptions): Collator; supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; - }; + } + + var Collator: CollatorConstructor; interface NumberFormatOptions { localeMatcher?: string | undefined; @@ -4454,12 +4463,15 @@ declare namespace Intl { format(value: number): string; resolvedOptions(): ResolvedNumberFormatOptions; } - var NumberFormat: { + + interface NumberFormatConstructor { new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; readonly prototype: NumberFormat; - }; + } + + var NumberFormat: NumberFormatConstructor; interface DateTimeFormatOptions { localeMatcher?: "best fit" | "lookup" | undefined; @@ -4474,7 +4486,7 @@ declare namespace Intl { timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; formatMatcher?: "best fit" | "basic" | undefined; hour12?: boolean | undefined; - timeZone?: string | (typeof globalThis extends { Temporal: { TimeZoneProtocol: infer T; }; } ? T : undefined) | undefined + timeZone?: string | (typeof globalThis extends { Temporal: { TimeZoneProtocol: infer T; }; } ? T : undefined) | undefined; } interface ResolvedDateTimeFormatOptions { @@ -4498,12 +4510,15 @@ declare namespace Intl { format(date?: Date | number): string; resolvedOptions(): ResolvedDateTimeFormatOptions; } - var DateTimeFormat: { + + interface DateTimeFormatConstructor { new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; readonly prototype: DateTimeFormat; - }; + } + + var DateTimeFormat: DateTimeFormatConstructor; } interface String { diff --git a/cli/tsc/dts/lib.esnext.collection.d.ts b/cli/tsc/dts/lib.esnext.collection.d.ts new file mode 100644 index 000000000..a48fd93d5 --- /dev/null +++ b/cli/tsc/dts/lib.esnext.collection.d.ts @@ -0,0 +1,29 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// <reference no-default-lib="true"/> + +interface MapConstructor { + /** + * Groups members of an iterable according to the return value of the passed callback. + * @param items An iterable. + * @param keySelector A callback which will be invoked for each item in items. + */ + groupBy<K, T>( + items: Iterable<T>, + keySelector: (item: T, index: number) => K, + ): Map<K, T[]>; +} diff --git a/cli/tsc/dts/lib.esnext.d.ts b/cli/tsc/dts/lib.esnext.d.ts index 0f265acfa..63b388aba 100644 --- a/cli/tsc/dts/lib.esnext.d.ts +++ b/cli/tsc/dts/lib.esnext.d.ts @@ -22,3 +22,6 @@ and limitations under the License. /// <reference lib="esnext.object" /> /// <reference lib="esnext.decorators" /> /// <reference lib="esnext.disposable" /> +/// <reference lib="esnext.promise" /> +/// <reference lib="esnext.object" /> +/// <reference lib="esnext.collection" /> diff --git a/cli/tsc/dts/lib.esnext.disposable.d.ts b/cli/tsc/dts/lib.esnext.disposable.d.ts index 7225dead2..0fea9442a 100644 --- a/cli/tsc/dts/lib.esnext.disposable.d.ts +++ b/cli/tsc/dts/lib.esnext.disposable.d.ts @@ -43,7 +43,7 @@ interface SuppressedError extends Error { suppressed: any; } -interface SuppressedErrorConstructor extends ErrorConstructor { +interface SuppressedErrorConstructor { new (error: any, suppressed: any, message?: string): SuppressedError; (error: any, suppressed: any, message?: string): SuppressedError; readonly prototype: SuppressedError; diff --git a/cli/tsc/dts/lib.esnext.full.d.ts b/cli/tsc/dts/lib.esnext.full.d.ts index 0e00a3737..a1a959e2c 100644 --- a/cli/tsc/dts/lib.esnext.full.d.ts +++ b/cli/tsc/dts/lib.esnext.full.d.ts @@ -21,3 +21,4 @@ and limitations under the License. /// <reference lib="webworker.importscripts" /> /// <reference lib="scripthost" /> /// <reference lib="dom.iterable" /> +/// <reference lib="dom.asynciterable" /> diff --git a/cli/tsc/dts/lib.esnext.object.d.ts b/cli/tsc/dts/lib.esnext.object.d.ts index 3440d8d0d..b0885ae0b 100644 --- a/cli/tsc/dts/lib.esnext.object.d.ts +++ b/cli/tsc/dts/lib.esnext.object.d.ts @@ -13,20 +13,17 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ + /// <reference no-default-lib="true"/> -// NOTE(iuioiua): taken from https://github.com/microsoft/TypeScript/issues/47171#issuecomment-1697373352 -// while we wait for these types to officially ship interface ObjectConstructor { - groupBy<Item, Key extends PropertyKey>( - items: Iterable<Item>, - keySelector: (item: Item, index: number) => Key, - ): Partial<Record<Key, Item[]>>; -} - -interface MapConstructor { - groupBy<Item, Key>( - items: Iterable<Item>, - keySelector: (item: Item, index: number) => Key, - ): Map<Key, Item[]>; + /** + * Groups members of an iterable according to the return value of the passed callback. + * @param items An iterable. + * @param keySelector A callback which will be invoked for each item in items. + */ + groupBy<K extends PropertyKey, T>( + items: Iterable<T>, + keySelector: (item: T, index: number) => K, + ): Partial<Record<K, T[]>>; } diff --git a/cli/tsc/dts/lib.esnext.promise.d.ts b/cli/tsc/dts/lib.esnext.promise.d.ts new file mode 100644 index 000000000..b890983b3 --- /dev/null +++ b/cli/tsc/dts/lib.esnext.promise.d.ts @@ -0,0 +1,35 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// <reference no-default-lib="true"/> + +interface PromiseWithResolvers<T> { + promise: Promise<T>; + resolve: (value: T | PromiseLike<T>) => void; + reject: (reason?: any) => void; +} + +interface PromiseConstructor { + /** + * Creates a new Promise and returns it in an object, along with its resolve and reject functions. + * @returns An object with the properties `promise`, `resolve`, and `reject`. + * + * ```ts + * const { promise, resolve, reject } = Promise.withResolvers<T>(); + * ``` + */ + withResolvers<T>(): PromiseWithResolvers<T>; +} diff --git a/cli/tsc/dts/lib.webworker.asynciterable.d.ts b/cli/tsc/dts/lib.webworker.asynciterable.d.ts new file mode 100644 index 000000000..421a6b9dc --- /dev/null +++ b/cli/tsc/dts/lib.webworker.asynciterable.d.ts @@ -0,0 +1,28 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// <reference no-default-lib="true"/> + +///////////////////////////// +/// Worker Async Iterable APIs +///////////////////////////// + +interface FileSystemDirectoryHandle { + [Symbol.asyncIterator](): AsyncIterableIterator<[string, FileSystemHandle]>; + entries(): AsyncIterableIterator<[string, FileSystemHandle]>; + keys(): AsyncIterableIterator<string>; + values(): AsyncIterableIterator<FileSystemHandle>; +} diff --git a/cli/tsc/dts/lib.webworker.d.ts b/cli/tsc/dts/lib.webworker.d.ts index 82f0b0b30..8fd57617a 100644 --- a/cli/tsc/dts/lib.webworker.d.ts +++ b/cli/tsc/dts/lib.webworker.d.ts @@ -182,7 +182,7 @@ interface EcdsaParams extends Algorithm { } interface EncodedVideoChunkInit { - data: BufferSource; + data: AllowSharedBufferSource; duration?: number; timestamp: number; type: EncodedVideoChunkType; @@ -267,7 +267,6 @@ interface FontFaceDescriptors { stretch?: string; style?: string; unicodeRange?: string; - variant?: string; weight?: string; } @@ -432,32 +431,21 @@ interface NavigationPreloadState { headerValue?: string; } -interface NotificationAction { - action: string; - icon?: string; - title: string; -} - interface NotificationEventInit extends ExtendableEventInit { action?: string; notification: Notification; } interface NotificationOptions { - actions?: NotificationAction[]; badge?: string; body?: string; data?: any; dir?: NotificationDirection; icon?: string; - image?: string; lang?: string; - renotify?: boolean; requireInteraction?: boolean; silent?: boolean | null; tag?: string; - timestamp?: EpochTimeStamp; - vibrate?: VibratePattern; } interface Pbkdf2Params extends Algorithm { @@ -535,16 +523,21 @@ interface QueuingStrategyInit { interface RTCEncodedAudioFrameMetadata { contributingSources?: number[]; + payloadType?: number; + sequenceNumber?: number; synchronizationSource?: number; } interface RTCEncodedVideoFrameMetadata { + contributingSources?: number[]; dependencies?: number[]; frameId?: number; height?: number; + payloadType?: number; spatialIndex?: number; synchronizationSource?: number; temporalIndex?: number; + timestamp?: number; width?: number; } @@ -605,6 +598,7 @@ interface RequestInit { method?: string; /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */ mode?: RequestMode; + priority?: RequestPriority; /** A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */ redirect?: RequestRedirect; /** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */ @@ -775,7 +769,7 @@ interface VideoDecoderConfig { codedHeight?: number; codedWidth?: number; colorSpace?: VideoColorSpaceInit; - description?: BufferSource; + description?: AllowSharedBufferSource; displayAspectHeight?: number; displayAspectWidth?: number; hardwareAcceleration?: HardwareAcceleration; @@ -888,7 +882,7 @@ interface WebTransportOptions { } interface WebTransportSendStreamOptions { - sendOrder?: number | null; + sendOrder?: number; } interface WorkerOptions { @@ -995,7 +989,9 @@ interface AbstractWorker { } interface AnimationFrameProvider { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame) */ cancelAnimationFrame(handle: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */ requestAnimationFrame(callback: FrameRequestCallback): number; } @@ -1682,10 +1678,20 @@ interface CanvasTextDrawingStyles { font: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontKerning) */ fontKerning: CanvasFontKerning; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontStretch) */ + fontStretch: CanvasFontStretch; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontVariantCaps) */ + fontVariantCaps: CanvasFontVariantCaps; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/letterSpacing) */ + letterSpacing: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textAlign) */ textAlign: CanvasTextAlign; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textBaseline) */ textBaseline: CanvasTextBaseline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textRendering) */ + textRendering: CanvasTextRendering; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/wordSpacing) */ + wordSpacing: string; } interface CanvasTransform { @@ -2245,6 +2251,7 @@ declare var DecompressionStream: { interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { "message": MessageEvent; "messageerror": MessageEvent; + "rtctransform": Event; } /** @@ -2263,6 +2270,8 @@ interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFramePr onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/rtctransform_event) */ + onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; /** * Aborts dedicatedWorkerGlobal. * @@ -2378,7 +2387,7 @@ interface EncodedVideoChunk { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/type) */ readonly type: EncodedVideoChunkType; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/copyTo) */ - copyTo(destination: BufferSource): void; + copyTo(destination: AllowSharedBufferSource): void; } declare var EncodedVideoChunk: { @@ -2783,7 +2792,11 @@ interface FileReader extends EventTarget { abort(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsArrayBuffer) */ readAsArrayBuffer(blob: Blob): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsBinaryString) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsBinaryString) + */ readAsBinaryString(blob: Blob): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsDataURL) */ readAsDataURL(blob: Blob): void; @@ -2960,8 +2973,6 @@ interface FontFace { style: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/unicodeRange) */ unicodeRange: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/variant) */ - variant: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/weight) */ weight: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/load) */ @@ -4122,6 +4133,8 @@ interface NotificationEventMap { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification) */ interface Notification extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/badge) */ + readonly badge: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/body) */ readonly body: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/data) */ @@ -4140,6 +4153,8 @@ interface Notification extends EventTarget { onerror: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */ onshow: ((this: Notification, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requireInteraction) */ + readonly requireInteraction: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */ readonly silent: boolean | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */ @@ -4738,9 +4753,13 @@ declare var PushSubscriptionOptions: { new(): PushSubscriptionOptions; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame) */ interface RTCEncodedAudioFrame { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/data) */ data: ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/timestamp) */ readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/getMetadata) */ getMetadata(): RTCEncodedAudioFrameMetadata; } @@ -4749,10 +4768,15 @@ declare var RTCEncodedAudioFrame: { new(): RTCEncodedAudioFrame; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame) */ interface RTCEncodedVideoFrame { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/data) */ data: ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/timestamp) */ readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/type) */ readonly type: RTCEncodedVideoFrameType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/getMetadata) */ getMetadata(): RTCEncodedVideoFrameMetadata; } @@ -4761,6 +4785,36 @@ declare var RTCEncodedVideoFrame: { new(): RTCEncodedVideoFrame; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer) */ +interface RTCRtpScriptTransformer extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/options) */ + readonly options: any; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/readable) */ + readonly readable: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/writable) */ + readonly writable: WritableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/generateKeyFrame) */ + generateKeyFrame(rid?: string): Promise<number>; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/sendKeyFrameRequest) */ + sendKeyFrameRequest(): Promise<void>; +} + +declare var RTCRtpScriptTransformer: { + prototype: RTCRtpScriptTransformer; + new(): RTCRtpScriptTransformer; +}; + +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCTransformEvent) */ +interface RTCTransformEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCTransformEvent/transformer) */ + readonly transformer: RTCRtpScriptTransformer; +} + +declare var RTCTransformEvent: { + prototype: RTCTransformEvent; + new(): RTCTransformEvent; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */ interface ReadableByteStreamController { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */ @@ -5130,6 +5184,7 @@ interface ServiceWorkerContainer extends EventTarget { oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/message_event) */ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/messageerror_event) */ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/ready) */ readonly ready: Promise<ServiceWorkerRegistration>; @@ -5192,6 +5247,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope { onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/registration) */ readonly registration: ServiceWorkerRegistration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/serviceWorker) */ readonly serviceWorker: ServiceWorker; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting) */ skipWaiting(): Promise<void>; @@ -5503,6 +5559,24 @@ interface TextMetrics { /** * Returns the measurement described below. * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/alphabeticBaseline) + */ + readonly alphabeticBaseline: number; + /** + * Returns the measurement described below. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/emHeightAscent) + */ + readonly emHeightAscent: number; + /** + * Returns the measurement described below. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/emHeightDescent) + */ + readonly emHeightDescent: number; + /** + * Returns the measurement described below. + * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxAscent) */ readonly fontBoundingBoxAscent: number; @@ -5515,6 +5589,18 @@ interface TextMetrics { /** * Returns the measurement described below. * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/hangingBaseline) + */ + readonly hangingBaseline: number; + /** + * Returns the measurement described below. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/ideographicBaseline) + */ + readonly ideographicBaseline: number; + /** + * Returns the measurement described below. + * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextMetrics/width) */ readonly width: number; @@ -5773,13 +5859,13 @@ interface VideoFrame { clone(): VideoFrame; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/close) */ close(): void; - copyTo(destination: BufferSource, options?: VideoFrameCopyToOptions): Promise<PlaneLayout[]>; + copyTo(destination: AllowSharedBufferSource, options?: VideoFrameCopyToOptions): Promise<PlaneLayout[]>; } declare var VideoFrame: { prototype: VideoFrame; new(image: CanvasImageSource, init?: VideoFrameInit): VideoFrame; - new(data: BufferSource, init: VideoFrameBufferInit): VideoFrame; + new(data: AllowSharedBufferSource, init: VideoFrameBufferInit): VideoFrame; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_color_buffer_float) */ @@ -5946,13 +6032,13 @@ interface WEBGL_lose_context { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw) */ interface WEBGL_multi_draw { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext) */ @@ -5974,7 +6060,6 @@ declare var WebGL2RenderingContext: { readonly STENCIL: 0x1802; readonly RED: 0x1903; readonly RGB8: 0x8051; - readonly RGBA8: 0x8058; readonly RGB10_A2: 0x8059; readonly TEXTURE_BINDING_3D: 0x806A; readonly UNPACK_SKIP_IMAGES: 0x806D; @@ -6485,6 +6570,7 @@ declare var WebGL2RenderingContext: { readonly RENDERBUFFER: 0x8D41; readonly RGBA4: 0x8056; readonly RGB5_A1: 0x8057; + readonly RGBA8: 0x8058; readonly RGB565: 0x8D62; readonly DEPTH_COMPONENT16: 0x81A5; readonly STENCIL_INDEX8: 0x8D48; @@ -6543,19 +6629,19 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void; + clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void; + clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clientWaitSync) */ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexImage3D) */ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void; - compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; + compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexSubImage3D) */ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void; - compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; + compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/copyBufferSubData) */ copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/copyTexSubImage3D) */ @@ -6601,7 +6687,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getBufferSubData) */ - getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void; + getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getFragDataLocation) */ getFragDataLocation(program: WebGLProgram, name: string): GLint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getIndexedParameter) */ @@ -6652,7 +6738,7 @@ interface WebGL2RenderingContextBase { texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void; texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void; - texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void; + texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texStorage2D) */ texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texStorage3D) */ @@ -6660,39 +6746,39 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texSubImage3D) */ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void; texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; - texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: GLuint): void; + texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformBlockBinding) */ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribDivisor) */ vertexAttribDivisor(index: GLuint, divisor: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ @@ -6719,7 +6805,6 @@ interface WebGL2RenderingContextBase { readonly STENCIL: 0x1802; readonly RED: 0x1903; readonly RGB8: 0x8051; - readonly RGBA8: 0x8058; readonly RGB10_A2: 0x8059; readonly TEXTURE_BINDING_3D: 0x806A; readonly UNPACK_SKIP_IMAGES: 0x806D; @@ -6975,55 +7060,55 @@ interface WebGL2RenderingContextBase { interface WebGL2RenderingContextOverloads { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferData) */ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void; - bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void; - bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void; + bufferData(target: GLenum, srcData: AllowSharedBufferSource | null, usage: GLenum): void; + bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferSubData) */ - bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void; - bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void; + bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: AllowSharedBufferSource): void; + bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void; - compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; + compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexSubImage2D) */ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void; - compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; + compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/readPixels) */ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void; readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void; - readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void; + readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texImage2D) */ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void; texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; - texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void; + texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texSubImage2D) */ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; - texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void; + texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; } /** @@ -7392,6 +7477,7 @@ declare var WebGLRenderingContext: { readonly RENDERBUFFER: 0x8D41; readonly RGBA4: 0x8056; readonly RGB5_A1: 0x8057; + readonly RGBA8: 0x8058; readonly RGB565: 0x8D62; readonly DEPTH_COMPONENT16: 0x81A5; readonly STENCIL_INDEX8: 0x8D48; @@ -7965,6 +8051,7 @@ interface WebGLRenderingContextBase { readonly RENDERBUFFER: 0x8D41; readonly RGBA4: 0x8056; readonly RGB5_A1: 0x8057; + readonly RGBA8: 0x8058; readonly RGB565: 0x8D62; readonly DEPTH_COMPONENT16: 0x81A5; readonly STENCIL_INDEX8: 0x8D48; @@ -8006,9 +8093,9 @@ interface WebGLRenderingContextBase { interface WebGLRenderingContextOverloads { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferData) */ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void; - bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void; + bufferData(target: GLenum, data: AllowSharedBufferSource | null, usage: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferSubData) */ - bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void; + bufferSubData(target: GLenum, offset: GLintptr, data: AllowSharedBufferSource): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexSubImage2D) */ @@ -8290,13 +8377,13 @@ interface WebTransportDatagramDuplexStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark) */ incomingHighWaterMark: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge) */ - incomingMaxAge: number; + incomingMaxAge: number | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize) */ readonly maxDatagramSize: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark) */ outgoingHighWaterMark: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge) */ - outgoingMaxAge: number; + outgoingMaxAge: number | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/readable) */ readonly readable: ReadableStream; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable) */ @@ -8792,44 +8879,44 @@ declare var XMLHttpRequestUpload: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */ interface Console { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/assert) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/assert_static) */ assert(condition?: boolean, ...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */ clear(): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */ count(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */ countReset(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */ debug(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */ dir(item?: any, options?: any): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */ dirxml(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */ error(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */ group(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */ groupCollapsed(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */ groupEnd(): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */ info(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */ log(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */ table(tabularData?: any, properties?: string[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */ time(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */ timeEnd(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */ timeLog(label?: string, ...data: any[]): void; timeStamp(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */ trace(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */ warn(...data: any[]): void; } @@ -8845,11 +8932,11 @@ declare namespace WebAssembly { (message?: string): CompileError; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global) */ interface Global<T extends ValueType = ValueType> { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/value) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global/value) */ value: ValueTypeMap[T]; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/valueOf) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global/valueOf) */ valueOf(): ValueTypeMap[T]; } @@ -8858,9 +8945,9 @@ declare namespace WebAssembly { new<T extends ValueType = ValueType>(descriptor: GlobalDescriptor<T>, v?: ValueTypeMap[T]): Global<T>; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Instance) */ interface Instance { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance/exports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Instance/exports) */ readonly exports: Exports; } @@ -8878,11 +8965,11 @@ declare namespace WebAssembly { (message?: string): LinkError; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory) */ interface Memory { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory/buffer) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory/buffer) */ readonly buffer: ArrayBuffer; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory/grow) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory/grow) */ grow(delta: number): number; } @@ -8891,18 +8978,18 @@ declare namespace WebAssembly { new(descriptor: MemoryDescriptor): Memory; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module) */ interface Module { } var Module: { prototype: Module; new(bytes: BufferSource): Module; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module/customSections) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/customSections_static) */ customSections(moduleObject: Module, sectionName: string): ArrayBuffer[]; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module/exports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/exports_static) */ exports(moduleObject: Module): ModuleExportDescriptor[]; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module/imports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/imports_static) */ imports(moduleObject: Module): ModuleImportDescriptor[]; }; @@ -8915,15 +9002,15 @@ declare namespace WebAssembly { (message?: string): RuntimeError; }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table) */ interface Table { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/length) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/length) */ readonly length: number; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/get) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/get) */ get(index: number): any; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/grow) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/grow) */ grow(delta: number, value?: any): number; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/set) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/set) */ set(index: number, value?: any): void; } @@ -8983,16 +9070,16 @@ declare namespace WebAssembly { type Imports = Record<string, ModuleImports>; type ModuleImports = Record<string, ImportValue>; type ValueType = keyof ValueTypeMap; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/compile_static) */ function compile(bytes: BufferSource): Promise<Module>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/compileStreaming_static) */ function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/instantiate_static) */ function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>; function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/instantiateStreaming_static) */ function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/validate) */ + /** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/validate_static) */ function validate(bytes: BufferSource): boolean; } @@ -9086,6 +9173,8 @@ declare var name: string; declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/rtctransform_event) */ +declare var onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; /** * Aborts dedicatedWorkerGlobal. * @@ -9188,7 +9277,9 @@ declare function setInterval(handler: TimerHandler, timeout?: number, ...argumen declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */ declare function structuredClone<T = any>(value: T, options?: StructuredSerializeOptions): T; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame) */ declare function cancelAnimationFrame(handle: number): void; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */ declare function requestAnimationFrame(callback: FrameRequestCallback): number; declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -9244,7 +9335,6 @@ type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | VideoFrame | ArrayBuffer; type Uint32List = Uint32Array | GLuint[]; -type VibratePattern = number | number[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type AlphaOption = "discard" | "keep"; type AvcBitstreamFormat = "annexb" | "avc"; @@ -9306,6 +9396,7 @@ type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only- type RequestCredentials = "include" | "omit" | "same-origin"; type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt"; type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin"; +type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; diff --git a/cli/tsc/dts/lib.webworker.iterable.d.ts b/cli/tsc/dts/lib.webworker.iterable.d.ts index 68f9ae34b..54f5528b2 100644 --- a/cli/tsc/dts/lib.webworker.iterable.d.ts +++ b/cli/tsc/dts/lib.webworker.iterable.d.ts @@ -127,6 +127,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */ + generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>; @@ -154,22 +155,22 @@ interface WEBGL_draw_buffers { interface WEBGL_multi_draw { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: number, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: number, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: number, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: number, drawcount: GLsizei): void; } interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void; + clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void; + clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ drawBuffers(buffers: Iterable<GLenum>): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ @@ -183,25 +184,25 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ @@ -210,27 +211,27 @@ interface WebGL2RenderingContextBase { interface WebGL2RenderingContextOverloads { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void; } interface WebGLRenderingContextBase { diff --git a/cli/tsc/dts/typescript.d.ts b/cli/tsc/dts/typescript.d.ts index 7cb761a39..206b52407 100644 --- a/cli/tsc/dts/typescript.d.ts +++ b/cli/tsc/dts/typescript.d.ts @@ -49,9 +49,11 @@ declare namespace ts { readonly fileName: Path; readonly packageName: string; readonly projectRootPath: Path; + readonly id: number; } interface PackageInstalledResponse extends ProjectResponse { readonly kind: ActionPackageInstalled; + readonly id: number; readonly success: boolean; readonly message: string; } @@ -203,7 +205,7 @@ declare namespace ts { /** * Request to reload the project structure for all the opened files */ - interface ReloadProjectsRequest extends Message { + interface ReloadProjectsRequest extends Request { command: CommandTypes.ReloadProjects; } /** @@ -1085,6 +1087,7 @@ declare namespace ts { displayName: string; /** * Full display name of item to be renamed. + * If item to be renamed is a file, then this is the original text of the module specifer */ fullDisplayName: string; /** @@ -2931,6 +2934,13 @@ declare namespace ts { */ readonly organizeImportsCaseFirst?: "upper" | "lower" | false; /** + * Indicates where named type-only imports should sort. "inline" sorts named imports without regard to if the import is + * type-only. + * + * Default: `last` + */ + readonly organizeImportsTypeOrder?: "last" | "first" | "inline"; + /** * Indicates whether {@link ReferencesResponseItem.lineText} is supported. */ readonly disableLineTextInReferences?: boolean; @@ -3026,10 +3036,18 @@ declare namespace ts { ES6 = "ES6", ES2015 = "ES2015", ESNext = "ESNext", + Node16 = "Node16", + NodeNext = "NodeNext", + Preserve = "Preserve", } enum ModuleResolutionKind { Classic = "Classic", + /** @deprecated Renamed to `Node10` */ Node = "Node", + Node10 = "Node10", + Node16 = "Node16", + NodeNext = "NodeNext", + Bundler = "Bundler", } enum NewLineKind { Crlf = "Crlf", @@ -3314,18 +3332,6 @@ declare namespace ts { * Last version that was reported. */ private lastReportedVersion; - /** - * Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one) - * This property is changed in 'updateGraph' based on the set of files in program - */ - private projectProgramVersion; - /** - * Current version of the project state. It is changed when: - * - new root file was added/removed - * - edit happen in some file that is currently included in the project. - * This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project - */ - private projectStateVersion; protected projectErrors: Diagnostic[] | undefined; protected isInitialLoadPending: () => boolean; private readonly cancellationToken; @@ -3900,6 +3906,7 @@ declare namespace ts { private static escapeFilenameForRegex; resetSafeList(): void; applySafeList(proj: protocol.ExternalProject): NormalizedPath[]; + private applySafeListWorker; openExternalProject(proj: protocol.ExternalProject): void; hasDeferredExtension(): boolean; private enableRequestedPluginsAsync; @@ -4164,7 +4171,7 @@ declare namespace ts { subPath: string | undefined; } } - const versionMajorMinor = "5.3"; + const versionMajorMinor = "5.4"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -6682,6 +6689,22 @@ declare namespace ts { }; isSourceFileFromExternalLibrary(file: SourceFile): boolean; isSourceFileDefaultLibrary(file: SourceFile): boolean; + /** + * Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import + * attributes, if present, or the syntax the usage would have if emitted to JavaScript. In `--module node16` or `nodenext`, this may + * depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the input syntax of the reference. In other + * `module` modes, when overriding import attributes are not provided, this function returns `undefined`, as the result would have no + * impact on module resolution, emit, or type checking. + */ + getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode; + /** + * Calculates the final resolution mode for an import at some index within a file's `imports` list. This is the resolution mode + * explicitly provided via import attributes, if present, or the syntax the usage would have if emitted to JavaScript. In + * `--module node16` or `nodenext`, this may depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the + * input syntax of the reference. In other `module` modes, when overriding import attributes are not provided, this function returns + * `undefined`, as the result would have no impact on module resolution, emit, or type checking. + */ + getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode; getProjectReferences(): readonly ProjectReference[] | undefined; getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined; } @@ -6862,6 +6885,20 @@ declare namespace ts { */ getNeverType(): Type; /** + * Returns true if the "source" type is assignable to the "target" type. + * + * ```ts + * declare const abcLiteral: ts.Type; // Type of "abc" + * declare const stringType: ts.Type; // Type of string + * + * isTypeAssignableTo(abcLiteral, abcLiteral); // true; "abc" is assignable to "abc" + * isTypeAssignableTo(abcLiteral, stringType); // true; "abc" is assignable to string + * isTypeAssignableTo(stringType, abcLiteral); // false; string is not assignable to "abc" + * isTypeAssignableTo(stringType, stringType); // true; string is assignable to string + * ``` + */ + isTypeAssignableTo(source: Type, target: Type): boolean; + /** * True if this type is the `Array` or `ReadonlyArray` type from lib.d.ts. * This function will _not_ return true if passed a type which * extends `Array` (for example, the TypeScript AST's `NodeArray` type). @@ -6876,6 +6913,7 @@ declare namespace ts { * True if this type is assignable to `ReadonlyArray<any>`. */ isArrayLikeType(type: Type): boolean; + resolveName(name: string, location: Node | undefined, meaning: SymbolFlags, excludeGlobals: boolean): Symbol | undefined; getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined; /** * Depending on the operation performed, it may be appropriate to throw away the checker @@ -6921,6 +6959,7 @@ declare namespace ts { None = 0, NoTruncation = 1, WriteArrayAsGenericType = 2, + GenerateNamesForShadowedTypeParams = 4, UseStructuralFallback = 8, WriteTypeArgumentsOfSignature = 32, UseFullyQualifiedType = 64, @@ -6940,7 +6979,7 @@ declare namespace ts { InElementType = 2097152, InFirstTypeArgument = 4194304, InTypeAlias = 8388608, - NodeBuilderFlagsMask = 848330091, + NodeBuilderFlagsMask = 848330095, } enum SymbolFormatFlags { None = 0, @@ -7014,6 +7053,7 @@ declare namespace ts { Transient = 33554432, Assignment = 67108864, ModuleExports = 134217728, + All = -1, Enum = 384, Variable = 3, Value = 111551, @@ -7082,6 +7122,8 @@ declare namespace ts { ExportEquals = "export=", Default = "default", This = "this", + InstantiationExpression = "__instantiationExpression", + ImportAttributes = "__importAttributes", } /** * This represents a string whose leading underscore have been escaped by adding extra leading underscores. @@ -7646,6 +7688,7 @@ declare namespace ts { ESNext = 99, Node16 = 100, NodeNext = 199, + Preserve = 200, } enum JsxEmit { None = 0, @@ -7924,6 +7967,7 @@ declare namespace ts { Unspecified = 4, EmbeddedStatement = 5, JsxAttributeValue = 6, + ImportTypeNodeAttributes = 7, } enum OuterExpressionKinds { Parentheses = 1, @@ -8796,6 +8840,7 @@ declare namespace ts { readonly organizeImportsNumericCollation?: boolean; readonly organizeImportsAccentCollation?: boolean; readonly organizeImportsCaseFirst?: "upper" | "lower" | false; + readonly organizeImportsTypeOrder?: "first" | "last" | "inline"; readonly excludeLibrarySymbolsInNavTo?: boolean; } /** Represents a bigint literal value without requiring bigint support */ @@ -9201,6 +9246,7 @@ declare namespace ts { function isForInitializer(node: Node): node is ForInitializer; function isModuleBody(node: Node): node is ModuleBody; function isNamedImportBindings(node: Node): node is NamedImportBindings; + function isDeclarationStatement(node: Node): node is DeclarationStatement; function isStatement(node: Node): node is Statement; function isModuleReference(node: Node): node is ModuleReference; function isJsxTagNameExpression(node: Node): node is JsxTagNameExpression; @@ -9220,11 +9266,13 @@ declare namespace ts { function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain; function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean; function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean; + function isInternalDeclaration(node: Node, sourceFile?: SourceFile): boolean; const unchangedTextChangeRange: TextChangeRange; type ParameterPropertyDeclaration = ParameterDeclaration & { parent: ConstructorDeclaration; name: Identifier; }; + function isPartOfTypeNode(node: Node): boolean; /** * This function checks multiple locations for JSDoc comments that apply to a host node. * At each location, the whole comment may apply to the node, or only a specific tag in @@ -9863,7 +9911,7 @@ declare namespace ts { * @param visitor The callback used to visit each child. * @param context A lexical environment context for the visitor. */ - function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T; + function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext | undefined): T; /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * @@ -9871,7 +9919,7 @@ declare namespace ts { * @param visitor The callback used to visit each child. * @param context A lexical environment context for the visitor. */ - function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; + function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext | undefined, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer; @@ -9902,37 +9950,50 @@ declare namespace ts { */ function getModeForFileReference(ref: FileReference | string, containingFileMode: ResolutionMode): ResolutionMode; /** - * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly - * defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm). - * If you have an actual import node, prefer using getModeForUsageLocation on the reference string node. + * Use `program.getModeForResolutionAtIndex`, which retrieves the correct `compilerOptions`, instead of this function whenever possible. + * Calculates the final resolution mode for an import at some index within a file's `imports` list. This is the resolution mode + * explicitly provided via import attributes, if present, or the syntax the usage would have if emitted to JavaScript. In + * `--module node16` or `nodenext`, this may depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the + * input syntax of the reference. In other `module` modes, when overriding import attributes are not provided, this function returns + * `undefined`, as the result would have no impact on module resolution, emit, or type checking. * @param file File to fetch the resolution mode within * @param index Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations + * @param compilerOptions The compiler options for the program that owns the file. If the file belongs to a referenced project, the compiler options + * should be the options of the referenced project, not the referencing project. */ - function getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode; + function getModeForResolutionAtIndex(file: SourceFile, index: number, compilerOptions: CompilerOptions): ResolutionMode; /** - * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if - * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). - * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when - * `moduleResolution` is `node16`+. + * Use `program.getModeForUsageLocation`, which retrieves the correct `compilerOptions`, instead of this function whenever possible. + * Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import + * attributes, if present, or the syntax the usage would have if emitted to JavaScript. In `--module node16` or `nodenext`, this may + * depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the input syntax of the reference. In other + * `module` modes, when overriding import attributes are not provided, this function returns `undefined`, as the result would have no + * impact on module resolution, emit, or type checking. * @param file The file the import or import-like reference is contained within * @param usage The module reference string + * @param compilerOptions The compiler options for the program that owns the file. If the file belongs to a referenced project, the compiler options + * should be the options of the referenced project, not the referencing project. * @returns The final resolution mode of the import */ - function getModeForUsageLocation(file: { - impliedNodeFormat?: ResolutionMode; - }, usage: StringLiteralLike): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; + function getModeForUsageLocation( + file: { + impliedNodeFormat?: ResolutionMode; + }, + usage: StringLiteralLike, + compilerOptions: CompilerOptions, + ): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[]; /** * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the * `options` parameter. * - * @param fileName The normalized absolute path to check the format of (it need not exist on disk) + * @param fileName The file name to check the format of (it need not exist on disk) * @param [packageJsonInfoCache] A cache for package file lookups - it's best to have a cache when this function is called often * @param host The ModuleResolutionHost which can perform the filesystem lookups for package json data * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format */ - function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ResolutionMode; + function getImpliedNodeFormatForFile(fileName: string, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ResolutionMode; /** * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' * that represent a compilation unit. @@ -11119,6 +11180,10 @@ declare namespace ts { */ fileToRename?: string; displayName: string; + /** + * Full display name of item to be renamed. + * If item to be renamed is a file, then this is the original text of the module specifer + */ fullDisplayName: string; kind: ScriptElementKind; kindModifiers: string; |