diff options
Diffstat (limited to 'cli/dts')
-rw-r--r-- | cli/dts/lib.dom.d.ts | 435 | ||||
-rw-r--r-- | cli/dts/lib.dom.extras.d.ts | 4 | ||||
-rw-r--r-- | cli/dts/lib.dom.iterable.d.ts | 19 | ||||
-rw-r--r-- | cli/dts/lib.es2015.core.d.ts | 6 | ||||
-rw-r--r-- | cli/dts/lib.es2015.reflect.d.ts | 2 | ||||
-rw-r--r-- | cli/dts/lib.es2020.bigint.d.ts | 12 | ||||
-rw-r--r-- | cli/dts/lib.es2020.d.ts | 2 | ||||
-rw-r--r-- | cli/dts/lib.es2020.date.d.ts | 44 | ||||
-rw-r--r-- | cli/dts/lib.es2020.intl.d.ts | 51 | ||||
-rw-r--r-- | cli/dts/lib.es2020.number.d.ts | 30 | ||||
-rw-r--r-- | cli/dts/lib.es2021.intl.d.ts | 20 | ||||
-rw-r--r-- | cli/dts/lib.es2022.d.ts | 1 | ||||
-rw-r--r-- | cli/dts/lib.es2022.intl.d.ts | 111 | ||||
-rw-r--r-- | cli/dts/lib.es2022.object.d.ts | 2 | ||||
-rw-r--r-- | cli/dts/lib.es5.d.ts | 40 | ||||
-rw-r--r-- | cli/dts/lib.esnext.intl.d.ts | 5 | ||||
-rw-r--r-- | cli/dts/lib.webworker.d.ts | 135 | ||||
-rw-r--r-- | cli/dts/lib.webworker.iterable.d.ts | 6 | ||||
-rw-r--r-- | cli/dts/typescript.d.ts | 697 |
19 files changed, 1216 insertions, 406 deletions
diff --git a/cli/dts/lib.dom.d.ts b/cli/dts/lib.dom.d.ts index 997e731b5..7d8f7e3e1 100644 --- a/cli/dts/lib.dom.d.ts +++ b/cli/dts/lib.dom.d.ts @@ -721,6 +721,19 @@ interface LockOptions { steal?: boolean; } +interface MIDIConnectionEventInit extends EventInit { + port?: MIDIPort; +} + +interface MIDIMessageEventInit extends EventInit { + data?: Uint8Array; +} + +interface MIDIOptions { + software?: boolean; + sysex?: boolean; +} + interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo { configuration?: MediaDecodingConfiguration; } @@ -951,6 +964,11 @@ interface MutationObserverInit { subtree?: boolean; } +interface NavigationPreloadState { + enabled?: boolean; + headerValue?: string; +} + interface NotificationAction { action: string; icon?: string; @@ -1263,6 +1281,35 @@ interface RTCDtlsFingerprint { value?: string; } +interface RTCEncodedAudioFrameMetadata { + contributingSources?: number[]; + synchronizationSource?: number; +} + +interface RTCEncodedVideoFrameMetadata { + contributingSources?: number[]; + dependencies?: number[]; + frameId?: number; + height?: number; + spatialIndex?: number; + synchronizationSource?: number; + temporalIndex?: number; + width?: number; +} + +interface RTCErrorEventInit extends EventInit { + error: RTCError; +} + +interface RTCErrorInit { + errorDetail: RTCErrorDetailType; + httpRequestStatusCode?: number; + receivedAlert?: number; + sctpCauseCode?: number; + sdpLineNumber?: number; + sentAlert?: number; +} + interface RTCIceCandidateInit { candidate?: string; sdpMLineIndex?: number | null; @@ -1768,6 +1815,13 @@ interface UnderlyingSource<R = any> { type?: undefined; } +interface VideoColorSpaceInit { + fullRange?: boolean; + matrix?: VideoMatrixCoefficients; + primaries?: VideoColorPrimaries; + transfer?: VideoTransferCharacteristics; +} + interface VideoConfiguration { bitrate: number; colorGamut?: ColorGamut; @@ -1780,6 +1834,19 @@ interface VideoConfiguration { width: number; } +interface VideoFrameMetadata { + captureTime?: DOMHighResTimeStamp; + expectedDisplayTime: DOMHighResTimeStamp; + height: number; + mediaTime: number; + presentationTime: DOMHighResTimeStamp; + presentedFrames: number; + processingDuration?: number; + receiveTime?: DOMHighResTimeStamp; + rtpTimestamp?: number; + width: number; +} + interface WaveShaperOptions extends AudioNodeOptions { curve?: number[] | Float32Array; oversample?: OverSampleType; @@ -1914,6 +1981,8 @@ interface AbortSignal extends EventTarget { /** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */ readonly aborted: boolean; onabort: ((this: AbortSignal, ev: Event) => any) | null; + readonly reason: any; + throwIfAborted(): void; addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -2409,7 +2478,7 @@ interface Blob { readonly type: string; arrayBuffer(): Promise<ArrayBuffer>; slice(start?: number, end?: number, contentType?: string): Blob; - stream(): ReadableStream; + stream(): ReadableStream<Uint8Array>; text(): Promise<string>; } @@ -2784,6 +2853,7 @@ interface CSSStyleDeclaration { columns: string; contain: string; content: string; + contentVisibility: string; counterIncrement: string; counterReset: string; counterSet: string; @@ -2819,7 +2889,6 @@ interface CSSStyleDeclaration { fontStyle: string; fontSynthesis: string; fontVariant: string; - /** @deprecated */ fontVariantAlternates: string; fontVariantCaps: string; fontVariantEastAsian: string; @@ -2893,6 +2962,14 @@ interface CSSStyleDeclaration { markerMid: string; markerStart: string; mask: string; + maskClip: string; + maskComposite: string; + maskImage: string; + maskMode: string; + maskOrigin: string; + maskPosition: string; + maskRepeat: string; + maskSize: string; maskType: string; maxBlockSize: string; maxHeight: string; @@ -2906,7 +2983,6 @@ interface CSSStyleDeclaration { objectFit: string; objectPosition: string; offset: string; - offsetAnchor: string; offsetDistance: string; offsetPath: string; offsetRotate: string; @@ -2951,6 +3027,7 @@ interface CSSStyleDeclaration { placeSelf: string; pointerEvents: string; position: string; + printColorAdjust: string; quotes: string; resize: string; right: string; @@ -3251,13 +3328,13 @@ declare var CSSTransition: { * Available only in secure contexts. */ interface Cache { - add(request: RequestInfo): Promise<void>; + add(request: RequestInfo | URL): Promise<void>; addAll(requests: RequestInfo[]): Promise<void>; - delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>; - keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>; - match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>; - matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>; - put(request: RequestInfo, response: Response): Promise<void>; + delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<boolean>; + keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>; + match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<Response | undefined>; + matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>; + put(request: RequestInfo | URL, response: Response): Promise<void>; } declare var Cache: { @@ -3273,7 +3350,7 @@ interface CacheStorage { delete(cacheName: string): Promise<boolean>; has(cacheName: string): Promise<boolean>; keys(): Promise<string[]>; - match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>; + match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise<Response | undefined>; open(cacheName: string): Promise<Cache>; } @@ -3538,6 +3615,7 @@ declare var ClipboardEvent: { new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent; }; +/** Available only in secure contexts. */ interface ClipboardItem { readonly types: ReadonlyArray<string>; getType(type: string): Promise<Blob>; @@ -3545,7 +3623,7 @@ interface ClipboardItem { declare var ClipboardItem: { prototype: ClipboardItem; - new(items: Record<string, ClipboardItemDataType | PromiseLike<ClipboardItemDataType>>, options?: ClipboardItemOptions): ClipboardItem; + new(items: Record<string, string | Blob | PromiseLike<string | Blob>>, options?: ClipboardItemOptions): ClipboardItem; }; /** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */ @@ -4215,6 +4293,7 @@ declare var DeviceOrientationEvent: { }; interface DocumentEventMap extends DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap { + "DOMContentLoaded": Event; "fullscreenchange": Event; "fullscreenerror": Event; "pointerlockchange": Event; @@ -4432,6 +4511,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; createEvent(eventInterface: "DragEvent"): DragEvent; createEvent(eventInterface: "ErrorEvent"): ErrorEvent; + createEvent(eventInterface: "Event"): Event; + createEvent(eventInterface: "Events"): Event; createEvent(eventInterface: "FocusEvent"): FocusEvent; createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent; createEvent(eventInterface: "FormDataEvent"): FormDataEvent; @@ -4440,6 +4521,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; createEvent(eventInterface: "InputEvent"): InputEvent; createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; + createEvent(eventInterface: "MIDIConnectionEvent"): MIDIConnectionEvent; + createEvent(eventInterface: "MIDIMessageEvent"): MIDIMessageEvent; createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; @@ -4460,6 +4543,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent; createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent; createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent; + createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; @@ -4891,8 +4975,20 @@ interface ElementContentEditable { } interface ElementInternals extends ARIAMixin { + /** Returns the form owner of internals's target element. */ + readonly form: HTMLFormElement | null; + /** Returns a NodeList of all the label elements that internals's target element is associated with. */ + readonly labels: NodeList; /** Returns the ShadowRoot for internals's target element, if the target element is a shadow host, or null otherwise. */ readonly shadowRoot: ShadowRoot | null; + /** Returns true if internals's target element will be validated when the form is submitted; false otherwise. */ + readonly willValidate: boolean; + /** + * Sets both the state and submission value of internals's target element to value. + * + * If value is null, the element won't participate in form submission. + */ + setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void; } declare var ElementInternals: { @@ -4966,6 +5062,15 @@ declare var Event: { readonly NONE: number; }; +interface EventCounts { + forEach(callbackfn: (value: number, key: string, parent: EventCounts) => void, thisArg?: any): void; +} + +declare var EventCounts: { + prototype: EventCounts; + new(): EventCounts; +}; + interface EventListener { (evt: Event): void; } @@ -6159,14 +6264,29 @@ declare var HTMLDetailsElement: { new(): HTMLDetailsElement; }; -/** @deprecated this is not available in most browsers */ interface HTMLDialogElement extends HTMLElement { + open: boolean; + returnValue: string; + /** + * Closes the dialog element. + * + * The argument, if provided, provides a return value. + */ + close(returnValue?: string): void; + /** Displays the dialog element. */ + show(): void; + showModal(): void; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDialogElement, 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: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } +declare var HTMLDialogElement: { + prototype: HTMLDialogElement; + new(): HTMLDialogElement; +}; + /** @deprecated */ interface HTMLDirectoryElement extends HTMLElement { /** @deprecated */ @@ -7614,6 +7734,7 @@ interface HTMLScriptElement extends HTMLElement { declare var HTMLScriptElement: { prototype: HTMLScriptElement; new(): HTMLScriptElement; + supports(type: string): boolean; }; /** A <select> HTML Element. These elements also share all of the properties and methods of other HTML elements via the HTMLElement interface. */ @@ -7745,6 +7866,8 @@ declare var HTMLSpanElement: { /** A <style> element. It inherits properties and methods from its parent, HTMLElement, and from LinkStyle. */ interface HTMLStyleElement extends HTMLElement, LinkStyle { + /** Enables or disables the style sheet. */ + disabled: boolean; /** Sets or retrieves the media type. */ media: string; /** @@ -8251,8 +8374,10 @@ interface HTMLVideoElement extends HTMLMediaElement { readonly videoWidth: number; /** Gets or sets the width of the video element. */ width: number; + cancelVideoFrameCallback(handle: number): void; getVideoPlaybackQuality(): VideoPlaybackQuality; requestPictureInPicture(): Promise<PictureInPictureWindow>; + requestVideoFrameCallback(callback: VideoFrameRequestCallback): number; addEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -8759,6 +8884,7 @@ declare var ImageBitmapRenderingContext: { /** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */ interface ImageData { + readonly colorSpace: PredefinedColorSpace; /** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */ readonly data: Uint8ClampedArray; /** Returns the actual dimensions of the data in the ImageData object, in pixels. */ @@ -8977,6 +9103,126 @@ declare var LockManager: { new(): LockManager; }; +interface MIDIAccessEventMap { + "statechange": Event; +} + +/** Available only in secure contexts. */ +interface MIDIAccess extends EventTarget { + readonly inputs: MIDIInputMap; + onstatechange: ((this: MIDIAccess, ev: Event) => any) | null; + readonly outputs: MIDIOutputMap; + readonly sysexEnabled: boolean; + addEventListener<K extends keyof MIDIAccessEventMap>(type: K, listener: (this: MIDIAccess, ev: MIDIAccessEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener<K extends keyof MIDIAccessEventMap>(type: K, listener: (this: MIDIAccess, ev: MIDIAccessEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var MIDIAccess: { + prototype: MIDIAccess; + new(): MIDIAccess; +}; + +/** Available only in secure contexts. */ +interface MIDIConnectionEvent extends Event { + readonly port: MIDIPort; +} + +declare var MIDIConnectionEvent: { + prototype: MIDIConnectionEvent; + new(type: string, eventInitDict?: MIDIConnectionEventInit): MIDIConnectionEvent; +}; + +interface MIDIInputEventMap extends MIDIPortEventMap { + "midimessage": Event; +} + +/** Available only in secure contexts. */ +interface MIDIInput extends MIDIPort { + onmidimessage: ((this: MIDIInput, ev: Event) => 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; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var MIDIInput: { + prototype: MIDIInput; + new(): MIDIInput; +}; + +/** Available only in secure contexts. */ +interface MIDIInputMap { + forEach(callbackfn: (value: MIDIInput, key: string, parent: MIDIInputMap) => void, thisArg?: any): void; +} + +declare var MIDIInputMap: { + prototype: MIDIInputMap; + new(): MIDIInputMap; +}; + +/** Available only in secure contexts. */ +interface MIDIMessageEvent extends Event { + readonly data: Uint8Array; +} + +declare var MIDIMessageEvent: { + prototype: MIDIMessageEvent; + new(type: string, eventInitDict?: MIDIMessageEventInit): MIDIMessageEvent; +}; + +/** Available only in secure contexts. */ +interface MIDIOutput extends MIDIPort { + send(data: number[], timestamp?: DOMHighResTimeStamp): void; + addEventListener<K extends keyof MIDIPortEventMap>(type: K, listener: (this: MIDIOutput, ev: MIDIPortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener<K extends keyof MIDIPortEventMap>(type: K, listener: (this: MIDIOutput, ev: MIDIPortEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var MIDIOutput: { + prototype: MIDIOutput; + new(): MIDIOutput; +}; + +/** Available only in secure contexts. */ +interface MIDIOutputMap { + forEach(callbackfn: (value: MIDIOutput, key: string, parent: MIDIOutputMap) => void, thisArg?: any): void; +} + +declare var MIDIOutputMap: { + prototype: MIDIOutputMap; + new(): MIDIOutputMap; +}; + +interface MIDIPortEventMap { + "statechange": Event; +} + +/** Available only in secure contexts. */ +interface MIDIPort extends EventTarget { + readonly connection: MIDIPortConnectionState; + readonly id: string; + readonly manufacturer: string | null; + readonly name: string | null; + onstatechange: ((this: MIDIPort, ev: Event) => any) | null; + readonly state: MIDIPortDeviceState; + readonly type: MIDIPortType; + readonly version: string | null; + close(): Promise<MIDIPort>; + open(): Promise<MIDIPort>; + addEventListener<K extends keyof MIDIPortEventMap>(type: K, listener: (this: MIDIPort, ev: MIDIPortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener<K extends keyof MIDIPortEventMap>(type: K, listener: (this: MIDIPort, ev: MIDIPortEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var MIDIPort: { + prototype: MIDIPort; + new(): MIDIPort; +}; + interface MathMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap { } @@ -9665,8 +9911,21 @@ declare var NamedNodeMap: { new(): NamedNodeMap; }; +/** Available only in secure contexts. */ +interface NavigationPreloadManager { + disable(): Promise<void>; + enable(): Promise<void>; + getState(): Promise<NavigationPreloadState>; + setHeaderValue(value: string): Promise<void>; +} + +declare var NavigationPreloadManager: { + prototype: NavigationPreloadManager; + new(): NavigationPreloadManager; +}; + /** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */ -interface Navigator extends NavigatorAutomationInformation, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorPlugins, NavigatorStorage { +interface Navigator extends NavigatorAutomationInformation, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorPlugins, NavigatorStorage { /** Available only in secure contexts. */ readonly clipboard: Clipboard; /** Available only in secure contexts. */ @@ -9685,6 +9944,8 @@ interface Navigator extends NavigatorAutomationInformation, NavigatorConcurrentH canShare(data?: ShareData): boolean; getGamepads(): (Gamepad | null)[]; /** Available only in secure contexts. */ + requestMIDIAccess(options?: MIDIOptions): Promise<MIDIAccess>; + /** Available only in secure contexts. */ requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>; sendBeacon(url: string | URL, data?: BodyInit | null): boolean; /** Available only in secure contexts. */ @@ -9738,6 +9999,11 @@ interface NavigatorLanguage { readonly languages: ReadonlyArray<string>; } +/** Available only in secure contexts. */ +interface NavigatorLocks { + readonly locks: LockManager; +} + interface NavigatorNetworkInformation { readonly connection: NetworkInformation; } @@ -9749,6 +10015,7 @@ interface NavigatorOnLine { interface NavigatorPlugins { /** @deprecated */ readonly mimeTypes: MimeTypeArray; + readonly pdfViewerEnabled: boolean; /** @deprecated */ readonly plugins: PluginArray; /** @deprecated */ @@ -10256,6 +10523,7 @@ interface PerformanceEventMap { /** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */ interface Performance extends EventTarget { + readonly eventCounts: EventCounts; /** @deprecated */ readonly navigation: PerformanceNavigation; onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null; @@ -10367,7 +10635,7 @@ interface PerformanceNavigationTiming extends PerformanceResourceTiming { readonly loadEventEnd: DOMHighResTimeStamp; readonly loadEventStart: DOMHighResTimeStamp; readonly redirectCount: number; - readonly type: NavigationType; + readonly type: NavigationTimingType; readonly unloadEventEnd: DOMHighResTimeStamp; readonly unloadEventStart: DOMHighResTimeStamp; toJSON(): any; @@ -10790,6 +11058,7 @@ declare var RTCDTMFToneChangeEvent: { interface RTCDataChannelEventMap { "bufferedamountlow": Event; "close": Event; + "closing": Event; "error": Event; "message": MessageEvent; "open": Event; @@ -10806,6 +11075,7 @@ interface RTCDataChannel extends EventTarget { readonly negotiated: boolean; onbufferedamountlow: ((this: RTCDataChannel, ev: Event) => any) | null; onclose: ((this: RTCDataChannel, ev: Event) => any) | null; + onclosing: ((this: RTCDataChannel, ev: Event) => any) | null; onerror: ((this: RTCDataChannel, ev: Event) => any) | null; onmessage: ((this: RTCDataChannel, ev: MessageEvent) => any) | null; onopen: ((this: RTCDataChannel, ev: Event) => any) | null; @@ -10838,12 +11108,16 @@ declare var RTCDataChannelEvent: { }; interface RTCDtlsTransportEventMap { + "error": Event; "statechange": Event; } interface RTCDtlsTransport extends EventTarget { + readonly iceTransport: RTCIceTransport; + onerror: ((this: RTCDtlsTransport, ev: Event) => any) | null; onstatechange: ((this: RTCDtlsTransport, ev: Event) => any) | null; readonly state: RTCDtlsTransportState; + getRemoteCertificates(): ArrayBuffer[]; addEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -10855,6 +11129,51 @@ declare var RTCDtlsTransport: { new(): RTCDtlsTransport; }; +interface RTCEncodedAudioFrame { + data: ArrayBuffer; + readonly timestamp: number; + getMetadata(): RTCEncodedAudioFrameMetadata; +} + +declare var RTCEncodedAudioFrame: { + prototype: RTCEncodedAudioFrame; + new(): RTCEncodedAudioFrame; +}; + +interface RTCEncodedVideoFrame { + data: ArrayBuffer; + readonly timestamp: number; + readonly type: RTCEncodedVideoFrameType; + getMetadata(): RTCEncodedVideoFrameMetadata; +} + +declare var RTCEncodedVideoFrame: { + prototype: RTCEncodedVideoFrame; + new(): RTCEncodedVideoFrame; +}; + +interface RTCError extends DOMException { + readonly errorDetail: RTCErrorDetailType; + readonly receivedAlert: number | null; + readonly sctpCauseCode: number | null; + readonly sdpLineNumber: number | null; + readonly sentAlert: number | null; +} + +declare var RTCError: { + prototype: RTCError; + new(init: RTCErrorInit, message?: string): RTCError; +}; + +interface RTCErrorEvent extends Event { + readonly error: RTCError; +} + +declare var RTCErrorEvent: { + prototype: RTCErrorEvent; + new(type: string, eventInitDict: RTCErrorEventInit): RTCErrorEvent; +}; + /** The RTCIceCandidate interface—part of the WebRTC API—represents a candidate Internet Connectivity Establishment (ICE) configuration which may be used to establish an RTCPeerConnection. */ interface RTCIceCandidate { readonly address: string | null; @@ -10879,10 +11198,21 @@ declare var RTCIceCandidate: { new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate; }; +interface RTCIceTransportEventMap { + "gatheringstatechange": Event; + "statechange": Event; +} + /** Provides access to information about the ICE transport layer over which the data is being sent and received. */ interface RTCIceTransport extends EventTarget { readonly gatheringState: RTCIceGathererState; + ongatheringstatechange: ((this: RTCIceTransport, ev: Event) => any) | null; + onstatechange: ((this: RTCIceTransport, ev: Event) => any) | null; readonly state: RTCIceTransportState; + addEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var RTCIceTransport: { @@ -10923,6 +11253,7 @@ interface RTCPeerConnection extends EventTarget { readonly pendingLocalDescription: RTCSessionDescription | null; readonly pendingRemoteDescription: RTCSessionDescription | null; readonly remoteDescription: RTCSessionDescription | null; + readonly sctp: RTCSctpTransport | null; readonly signalingState: RTCSignalingState; addIceCandidate(candidate?: RTCIceCandidateInit): Promise<void>; /** @deprecated */ @@ -11035,6 +11366,27 @@ declare var RTCRtpTransceiver: { new(): RTCRtpTransceiver; }; +interface RTCSctpTransportEventMap { + "statechange": Event; +} + +interface RTCSctpTransport extends EventTarget { + readonly maxChannels: number | null; + readonly maxMessageSize: number; + onstatechange: ((this: RTCSctpTransport, ev: Event) => any) | null; + readonly state: RTCSctpTransportState; + readonly transport: RTCDtlsTransport; + addEventListener<K extends keyof RTCSctpTransportEventMap>(type: K, listener: (this: RTCSctpTransport, ev: RTCSctpTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener<K extends keyof RTCSctpTransportEventMap>(type: K, listener: (this: RTCSctpTransport, ev: RTCSctpTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var RTCSctpTransport: { + prototype: RTCSctpTransport; + new(): RTCSctpTransport; +}; + /** One end of a connection—or potential connection—and how it's configured. Each RTCSessionDescription consists of a description type indicating which part of the offer/answer negotiation process it describes and of the SDP descriptor of the session. */ interface RTCSessionDescription { readonly sdp: string; @@ -11223,7 +11575,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; interface ResizeObserver { @@ -13183,6 +13535,7 @@ interface ServiceWorkerRegistrationEventMap { interface ServiceWorkerRegistration extends EventTarget { readonly active: ServiceWorker | null; readonly installing: ServiceWorker | null; + readonly navigationPreload: NavigationPreloadManager; onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; readonly pushManager: PushManager; readonly scope: string; @@ -13576,10 +13929,10 @@ interface SubtleCrypto { encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>; exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>; exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>; - generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + 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: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>; - importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>; unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; @@ -14097,6 +14450,19 @@ declare var ValidityState: { new(): ValidityState; }; +interface VideoColorSpace { + readonly fullRange: boolean | null; + readonly matrix: VideoMatrixCoefficients | null; + readonly primaries: VideoColorPrimaries | null; + readonly transfer: VideoTransferCharacteristics | null; + toJSON(): VideoColorSpaceInit; +} + +declare var VideoColorSpace: { + prototype: VideoColorSpace; + new(init?: VideoColorSpaceInit): VideoColorSpace; +}; + /** Returned by the HTMLVideoElement.getVideoPlaybackQuality() method and contains metrics that can be used to determine the playback quality of a video. */ interface VideoPlaybackQuality { /** @deprecated */ @@ -14192,13 +14558,6 @@ interface WEBGL_compressed_texture_etc1 { readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum; } -interface WEBGL_compressed_texture_pvrtc { - readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: GLenum; - readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: GLenum; - readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG: GLenum; - readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG: GLenum; -} - /** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */ interface WEBGL_compressed_texture_s3tc { readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum; @@ -15701,7 +16060,6 @@ interface WebGLRenderingContextBase { getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null; getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null; getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null; - getExtension(extensionName: "WEBGL_compressed_texture_pvrtc"): WEBGL_compressed_texture_pvrtc | null; getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null; getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null; getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null; @@ -16249,6 +16607,7 @@ declare var WheelEvent: { }; interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandlersEventMap { + "DOMContentLoaded": Event; "devicemotion": DeviceMotionEvent; "deviceorientation": DeviceOrientationEvent; "gamepadconnected": GamepadEvent; @@ -16448,11 +16807,12 @@ interface WindowOrWorkerGlobalScope { clearTimeout(id?: number): void; createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>; - fetch(input: RequestInfo, init?: RequestInit): Promise<Response>; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>; queueMicrotask(callback: VoidFunction): void; reportError(e: any): void; setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; + structuredClone(value: any, options?: StructuredSerializeOptions): any; } interface WindowSessionStorage { @@ -17097,6 +17457,10 @@ interface UnderlyingSourceStartCallback<R> { (controller: ReadableStreamController<R>): any; } +interface VideoFrameRequestCallback { + (now: DOMHighResTimeStamp, metadata: VideoFrameMetadata): void; +} + interface VoidFunction { (): void; } @@ -17729,11 +18093,12 @@ declare function clearInterval(id?: number): void; declare function clearTimeout(id?: number): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>; -declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>; declare function queueMicrotask(callback: VoidFunction): void; declare function reportError(e: any): void; declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; +declare function structuredClone(value: any, options?: StructuredSerializeOptions): any; declare var sessionStorage: Storage; declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -17748,8 +18113,7 @@ type BufferSource = ArrayBufferView | ArrayBuffer; type COSEAlgorithmIdentifier = number; type CSSNumberish = number; type CanvasImageSource = HTMLOrSVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap; -type ClipboardItemData = Promise<ClipboardItemDataType>; -type ClipboardItemDataType = string | Blob; +type ClipboardItemData = Promise<string | Blob>; type ClipboardItems = ClipboardItem[]; type ConstrainBoolean = boolean | ConstrainBooleanParameters; type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters; @@ -17864,6 +18228,9 @@ type KeyType = "private" | "public" | "secret"; type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey"; type LineAlignSetting = "center" | "end" | "start"; type LockMode = "exclusive" | "shared"; +type MIDIPortConnectionState = "closed" | "open" | "pending"; +type MIDIPortDeviceState = "connected" | "disconnected"; +type MIDIPortType = "input" | "output"; type MediaDecodingType = "file" | "media-source" | "webrtc"; type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput"; type MediaEncodingType = "record" | "webrtc"; @@ -17875,7 +18242,7 @@ type MediaKeysRequirement = "not-allowed" | "optional" | "required"; type MediaSessionAction = "hangup" | "nexttrack" | "pause" | "play" | "previoustrack" | "seekbackward" | "seekforward" | "seekto" | "skipad" | "stop" | "togglecamera" | "togglemicrophone"; type MediaSessionPlaybackState = "none" | "paused" | "playing"; type MediaStreamTrackState = "ended" | "live"; -type NavigationType = "back_forward" | "navigate" | "prerender" | "reload"; +type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload"; type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; type OrientationLockType = "any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary"; @@ -17897,6 +18264,8 @@ type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat"; type RTCDataChannelState = "closed" | "closing" | "connecting" | "open"; type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution"; type RTCDtlsTransportState = "closed" | "connected" | "connecting" | "failed" | "new"; +type RTCEncodedVideoFrameType = "delta" | "empty" | "key"; +type RTCErrorDetailType = "data-channel-failure" | "dtls-failure" | "fingerprint-failure" | "hardware-encoder-error" | "hardware-encoder-not-available" | "sctp-failure" | "sdp-syntax-error"; type RTCIceCandidateType = "host" | "prflx" | "relay" | "srflx"; type RTCIceComponent = "rtcp" | "rtp"; type RTCIceConnectionState = "checking" | "closed" | "completed" | "connected" | "disconnected" | "failed" | "new"; @@ -17911,6 +18280,7 @@ type RTCPeerConnectionState = "closed" | "connected" | "connecting" | "disconnec type RTCPriorityType = "high" | "low" | "medium" | "very-low"; type RTCRtcpMuxPolicy = "require"; type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendrecv" | "stopped"; +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"; @@ -17944,7 +18314,10 @@ type TextTrackMode = "disabled" | "hidden" | "showing"; type TouchType = "direct" | "stylus"; type TransferFunction = "hlg" | "pq" | "srgb"; type UserVerificationRequirement = "discouraged" | "preferred" | "required"; +type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m"; type VideoFacingModeEnum = "environment" | "left" | "right" | "user"; +type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m"; +type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m"; type WebGLPowerPreference = "default" | "high-performance" | "low-power"; type WorkerType = "classic" | "module"; type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; diff --git a/cli/dts/lib.dom.extras.d.ts b/cli/dts/lib.dom.extras.d.ts index e9a6ab84c..b80435a78 100644 --- a/cli/dts/lib.dom.extras.d.ts +++ b/cli/dts/lib.dom.extras.d.ts @@ -7,10 +7,6 @@ /// <reference no-default-lib="true"/> -interface AbortSignal extends EventTarget { - readonly reason?: unknown; -} - declare interface URLPatternInit { protocol?: string; username?: string; diff --git a/cli/dts/lib.dom.iterable.d.ts b/cli/dts/lib.dom.iterable.d.ts index 667eaad63..4fcd2a2db 100644 --- a/cli/dts/lib.dom.iterable.d.ts +++ b/cli/dts/lib.dom.iterable.d.ts @@ -69,6 +69,9 @@ interface DataTransferItemList { [Symbol.iterator](): IterableIterator<DataTransferItem>; } +interface EventCounts extends ReadonlyMap<string, number> { +} + interface FileList { [Symbol.iterator](): IterableIterator<File>; } @@ -130,6 +133,16 @@ interface IDBObjectStore { createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex; } +interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> { +} + +interface MIDIOutput { + send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void; +} + +interface MIDIOutputMap extends ReadonlyMap<string, MIDIOutput> { +} + interface MediaKeyStatusMap { [Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>; entries(): IterableIterator<[BufferSource, MediaKeyStatus]>; @@ -233,10 +246,10 @@ interface StyleSheetList { interface SubtleCrypto { deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>; - generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + 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>; - importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; } diff --git a/cli/dts/lib.es2015.core.d.ts b/cli/dts/lib.es2015.core.d.ts index eec8dde90..e55dc65c8 100644 --- a/cli/dts/lib.es2015.core.d.ts +++ b/cli/dts/lib.es2015.core.d.ts @@ -283,7 +283,7 @@ interface ObjectConstructor { * @param target The target object to copy to. * @param source The source object from which to copy properties. */ - assign<T, U>(target: T, source: U): T & U; + assign<T extends {}, U>(target: T, source: U): T & U; /** * Copy the values of all of the enumerable own properties from one or more source objects to a @@ -292,7 +292,7 @@ interface ObjectConstructor { * @param source1 The first source object from which to copy properties. * @param source2 The second source object from which to copy properties. */ - assign<T, U, V>(target: T, source1: U, source2: V): T & U & V; + assign<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V; /** * Copy the values of all of the enumerable own properties from one or more source objects to a @@ -302,7 +302,7 @@ interface ObjectConstructor { * @param source2 The second source object from which to copy properties. * @param source3 The third source object from which to copy properties. */ - assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W; + assign<T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W; /** * Copy the values of all of the enumerable own properties from one or more source objects to a diff --git a/cli/dts/lib.es2015.reflect.d.ts b/cli/dts/lib.es2015.reflect.d.ts index d022a2b77..d1beb6862 100644 --- a/cli/dts/lib.es2015.reflect.d.ts +++ b/cli/dts/lib.es2015.reflect.d.ts @@ -44,7 +44,7 @@ declare namespace Reflect { * @param propertyKey The property name. * @param attributes Descriptor for the property. It can be for a data property or an accessor property. */ - function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; + function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): boolean; /** * Removes a property from an object, equivalent to `delete target[propertyKey]`, diff --git a/cli/dts/lib.es2020.bigint.d.ts b/cli/dts/lib.es2020.bigint.d.ts index 4d2cc2ad1..a0ebccaf9 100644 --- a/cli/dts/lib.es2020.bigint.d.ts +++ b/cli/dts/lib.es2020.bigint.d.ts @@ -18,6 +18,8 @@ and limitations under the License. /// <reference no-default-lib="true"/> +/// <reference lib="es2020.intl" /> + interface BigIntToLocaleStringOptions { /** * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. @@ -112,7 +114,7 @@ interface BigInt { toString(radix?: number): string; /** Returns a string representation appropriate to the host environment's current locale. */ - toLocaleString(locales?: string, options?: BigIntToLocaleStringOptions): string; + toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; /** Returns the primitive value of the specified object. */ valueOf(): bigint; @@ -691,6 +693,7 @@ interface DataView { * Gets the BigInt64 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; @@ -698,6 +701,7 @@ interface DataView { * Gets the BigUint64 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; @@ -705,8 +709,7 @@ interface DataView { * Stores a BigInt64 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; @@ -714,8 +717,7 @@ interface DataView { * Stores a BigUint64 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; } diff --git a/cli/dts/lib.es2020.d.ts b/cli/dts/lib.es2020.d.ts index 3e739ac7f..ae81c40b4 100644 --- a/cli/dts/lib.es2020.d.ts +++ b/cli/dts/lib.es2020.d.ts @@ -20,6 +20,8 @@ and limitations under the License. /// <reference lib="es2019" /> /// <reference lib="es2020.bigint" /> +/// <reference lib="es2020.date" /> +/// <reference lib="es2020.number" /> /// <reference lib="es2020.promise" /> /// <reference lib="es2020.sharedmemory" /> /// <reference lib="es2020.string" /> diff --git a/cli/dts/lib.es2020.date.d.ts b/cli/dts/lib.es2020.date.d.ts new file mode 100644 index 000000000..8eeb6b981 --- /dev/null +++ b/cli/dts/lib.es2020.date.d.ts @@ -0,0 +1,44 @@ +/*! ***************************************************************************** +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"/> + + +/// <reference lib="es2020.intl" /> + +interface Date { + /** + * Converts a date and time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects 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. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + + /** + * Converts a date to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects 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. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; + + /** + * Converts a time to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects 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. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; +}
\ No newline at end of file diff --git a/cli/dts/lib.es2020.intl.d.ts b/cli/dts/lib.es2020.intl.d.ts index 3e47f89cf..af981e31c 100644 --- a/cli/dts/lib.es2020.intl.d.ts +++ b/cli/dts/lib.es2020.intl.d.ts @@ -79,6 +79,13 @@ declare namespace Intl { type BCP47LanguageTag = string; /** + * The locale(s) to use + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + */ + type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined; + + /** * An object with some or all of properties of `options` parameter * of `Intl.RelativeTimeFormat` constructor. * @@ -274,6 +281,10 @@ declare namespace Intl { } interface Locale extends LocaleOptions { + /** A string containing the language, and the script and region if available. */ + baseName: string; + /** The primary language subtag associated with the locale. */ + language: string; /** Gets the most likely values for the language, script, and region of the locale based on existing values. */ maximize(): Locale; /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */ @@ -297,15 +308,39 @@ declare namespace Intl { * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). */ const Locale: { - new (tag?: BCP47LanguageTag, options?: LocaleOptions): Locale; + new (tag: BCP47LanguageTag | Locale, options?: LocaleOptions): Locale; }; - interface DisplayNamesOptions { + type DisplayNamesFallback = + | "code" + | "none"; + + type DisplayNamesType = + | "language" + | "region" + | "script" + | "calendar" + | "dateTimeField" + | "currency"; + + type DisplayNamesLanguageDisplay = + | "dialect" + | "standard"; + + interface DisplayNamesOptions { + localeMatcher?: RelativeTimeFormatLocaleMatcher; + style?: RelativeTimeFormatStyle; + type: DisplayNamesType; + languageDisplay?: DisplayNamesLanguageDisplay; + fallback?: DisplayNamesFallback; + } + + interface ResolvedDisplayNamesOptions { locale: UnicodeBCP47LocaleIdentifier; - localeMatcher: RelativeTimeFormatLocaleMatcher; style: RelativeTimeFormatStyle; - type: "language" | "region" | "script" | "currency"; - fallback: "code" | "none"; + type: DisplayNamesType; + fallback: DisplayNamesFallback; + languageDisplay?: DisplayNamesLanguageDisplay; } interface DisplayNames { @@ -331,7 +366,7 @@ declare namespace Intl { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). */ - resolvedOptions(): DisplayNamesOptions; + resolvedOptions(): ResolvedDisplayNamesOptions; } /** @@ -352,7 +387,7 @@ declare namespace Intl { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). */ - new(locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: Partial<DisplayNamesOptions>): DisplayNames; + new(locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; /** * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. @@ -367,7 +402,7 @@ declare namespace Intl { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). */ - supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: {localeMatcher: RelativeTimeFormatLocaleMatcher}): BCP47LanguageTag[]; + supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher }): BCP47LanguageTag[]; }; } diff --git a/cli/dts/lib.es2020.number.d.ts b/cli/dts/lib.es2020.number.d.ts new file mode 100644 index 000000000..89f6a2723 --- /dev/null +++ b/cli/dts/lib.es2020.number.d.ts @@ -0,0 +1,30 @@ +/*! ***************************************************************************** +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"/> + + +/// <reference lib="es2020.intl" /> + +interface Number { + /** + * Converts a number to a string by using the current or specified locale. + * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects 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. + * @param options An object that contains one or more properties that specify comparison options. + */ + toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; +} diff --git a/cli/dts/lib.es2021.intl.d.ts b/cli/dts/lib.es2021.intl.d.ts index 6380bf6fb..1e8cec37a 100644 --- a/cli/dts/lib.es2021.intl.d.ts +++ b/cli/dts/lib.es2021.intl.d.ts @@ -28,6 +28,11 @@ declare namespace Intl { fractionalSecondDigits?: 0 | 1 | 2 | 3 | undefined; } + interface DateTimeFormat { + formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string; + formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeFormatPart[]; + } + interface ResolvedDateTimeFormatOptions { formatMatcher?: "basic" | "best fit" | "best fit"; dateStyle?: "full" | "long" | "medium" | "short"; @@ -37,15 +42,10 @@ declare namespace Intl { fractionalSecondDigits?: 0 | 1 | 2 | 3; } - interface NumberFormat { - formatRange(startDate: number | bigint, endDate: number | bigint): string; - formatRangeToParts(startDate: number | bigint, endDate: number | bigint): NumberFormatPart[]; - } - /** * The locale matching algorithm to use. * - * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). */ type ListFormatLocaleMatcher = "lookup" | "best fit"; @@ -70,11 +70,11 @@ declare namespace Intl { */ interface ListFormatOptions { /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ - localeMatcher?: ListFormatLocaleMatcher; + localeMatcher?: ListFormatLocaleMatcher | undefined; /** The format of output message. */ - type?: ListFormatType; + type?: ListFormatType | undefined; /** The length of the internationalized message. */ - style?: ListFormatStyle; + style?: ListFormatStyle | undefined; } interface ListFormat { @@ -143,4 +143,4 @@ declare namespace Intl { */ supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<ListFormatOptions, "localeMatcher">): BCP47LanguageTag[]; }; -}
\ No newline at end of file +} diff --git a/cli/dts/lib.es2022.d.ts b/cli/dts/lib.es2022.d.ts index 73558c811..6d4283d28 100644 --- a/cli/dts/lib.es2022.d.ts +++ b/cli/dts/lib.es2022.d.ts @@ -21,5 +21,6 @@ and limitations under the License. /// <reference lib="es2021" /> /// <reference lib="es2022.array" /> /// <reference lib="es2022.error" /> +/// <reference lib="es2022.intl" /> /// <reference lib="es2022.object" /> /// <reference lib="es2022.string" /> diff --git a/cli/dts/lib.es2022.intl.d.ts b/cli/dts/lib.es2022.intl.d.ts new file mode 100644 index 000000000..ff487a11c --- /dev/null +++ b/cli/dts/lib.es2022.intl.d.ts @@ -0,0 +1,111 @@ +/*! ***************************************************************************** +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 { + + /** + * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + */ + interface SegmenterOptions { + /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ + localeMatcher?: "best fit" | "lookup" | undefined; + /** The type of input to be split */ + granularity?: "grapheme" | "word" | "sentence" | undefined; + } + + interface Segmenter { + /** + * Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity. + * + * @param input - The text to be segmented as a `string`. + * + * @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity. + */ + segment(input: string): Segments; + resolvedOptions(): ResolvedSegmenterOptions; + } + + interface ResolvedSegmenterOptions { + locale: string; + granularity: "grapheme" | "word" | "sentence"; + } + + interface Segments { + /** + * Returns an object describing the segment in the original string that includes the code unit at a specified index. + * + * @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`. + */ + containing(codeUnitIndex?: number): SegmentData; + + /** Returns an iterator to iterate over the segments. */ + [Symbol.iterator](): IterableIterator<SegmentData>; + } + + interface SegmentData { + /** A string containing the segment extracted from the original input string. */ + segment: string; + /** The code unit index in the original input string at which the segment begins. */ + index: number; + /** The complete input string that was segmented. */ + input: string; + /** + * A boolean value only if granularity is "word"; otherwise, undefined. + * If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false. + */ + isWordLike?: boolean; + } + + const Segmenter: { + prototype: Segmenter; + + /** + * Creates a new `Intl.Segmenter` object. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + * with some or all options of `SegmenterOptions`. + * + * @returns [Intl.Segmenter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). + */ + new(locales?: BCP47LanguageTag | BCP47LanguageTag[], 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. + * + * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. + * For the general form and interpretation of the `locales` argument, + * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * + * @param options An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). + * with some or all possible options. + * + * [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[]; + }; +} diff --git a/cli/dts/lib.es2022.object.d.ts b/cli/dts/lib.es2022.object.d.ts index 634601006..2fe2a1917 100644 --- a/cli/dts/lib.es2022.object.d.ts +++ b/cli/dts/lib.es2022.object.d.ts @@ -18,7 +18,7 @@ and limitations under the License. /// <reference no-default-lib="true"/> -interface Object { +interface ObjectConstructor { /** * Determines whether an object has a property with the specified name. * @param o An object. diff --git a/cli/dts/lib.es5.d.ts b/cli/dts/lib.es5.d.ts index 9f27ff527..d45132b5b 100644 --- a/cli/dts/lib.es5.d.ts +++ b/cli/dts/lib.es5.d.ts @@ -72,13 +72,13 @@ declare function decodeURIComponent(encodedURIComponent: string): string; /** * Encodes a text string as a valid Uniform Resource Identifier (URI) - * @param uri A value representing an encoded URI. + * @param uri A value representing an unencoded URI. */ declare function encodeURI(uri: string): string; /** * Encodes a text string as a valid component of a Uniform Resource Identifier (URI). - * @param uriComponent A value representing an encoded URI component. + * @param uriComponent A value representing an unencoded URI component. */ declare function encodeURIComponent(uriComponent: string | number | boolean): string; @@ -230,6 +230,12 @@ interface ObjectConstructor { * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ + freeze<T extends {[idx: string]: U | null | undefined | object}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>; + + /** + * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. + * @param o Object on which to lock the attributes. + */ freeze<T>(o: T): Readonly<T>; /** @@ -320,7 +326,7 @@ declare var Function: FunctionConstructor; /** * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter. */ -type ThisParameterType<T> = T extends (this: infer U, ...args: any[]) => any ? U : unknown; +type ThisParameterType<T> = T extends (this: infer U, ...args: never) => any ? U : unknown; /** * Removes the 'this' parameter from a function type. @@ -1683,6 +1689,7 @@ interface DataView { * Gets the Float32 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getFloat32(byteOffset: number, littleEndian?: boolean): number; @@ -1690,6 +1697,7 @@ interface DataView { * Gets the Float64 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getFloat64(byteOffset: number, littleEndian?: boolean): number; @@ -1704,12 +1712,14 @@ interface DataView { * Gets the Int16 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getInt16(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Int32 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getInt32(byteOffset: number, littleEndian?: boolean): number; @@ -1724,6 +1734,7 @@ interface DataView { * Gets the Uint16 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getUint16(byteOffset: number, littleEndian?: boolean): number; @@ -1731,6 +1742,7 @@ interface DataView { * Gets the Uint32 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. */ getUint32(byteOffset: number, littleEndian?: boolean): number; @@ -1738,8 +1750,7 @@ interface DataView { * Stores an Float32 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1747,8 +1758,7 @@ interface DataView { * Stores an Float64 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1763,8 +1773,7 @@ interface DataView { * Stores an Int16 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1772,8 +1781,7 @@ interface DataView { * Stores an Int32 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1788,8 +1796,7 @@ interface DataView { * Stores an Uint16 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; @@ -1797,8 +1804,7 @@ interface DataView { * Stores an Uint32 value at the specified byte offset from the start of the view. * @param byteOffset The place in the buffer at which the value should be set. * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. + * @param littleEndian If false or undefined, a big-endian value should be written. */ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } @@ -4405,6 +4411,7 @@ declare namespace Intl { new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat; (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; + readonly prototype: NumberFormat; }; interface DateTimeFormatOptions { @@ -4417,7 +4424,7 @@ declare namespace Intl { hour?: "numeric" | "2-digit" | undefined; minute?: "numeric" | "2-digit" | undefined; second?: "numeric" | "2-digit" | undefined; - timeZoneName?: "long" | "short" | undefined; + timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined; formatMatcher?: "best fit" | "basic" | undefined; hour12?: boolean | undefined; timeZone?: string | undefined; @@ -4448,6 +4455,7 @@ declare namespace Intl { new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; + readonly prototype: DateTimeFormat; }; } diff --git a/cli/dts/lib.esnext.intl.d.ts b/cli/dts/lib.esnext.intl.d.ts index ebb42fc37..954679457 100644 --- a/cli/dts/lib.esnext.intl.d.ts +++ b/cli/dts/lib.esnext.intl.d.ts @@ -19,5 +19,8 @@ and limitations under the License. declare namespace Intl { - // Empty for now + interface NumberFormat { + formatRange(start: number | bigint, end: number | bigint): string; + formatRangeToParts(start: number | bigint, end: number | bigint): NumberFormatPart[]; + } } diff --git a/cli/dts/lib.webworker.d.ts b/cli/dts/lib.webworker.d.ts index f6b3d43b3..6f9a2eaf5 100644 --- a/cli/dts/lib.webworker.d.ts +++ b/cli/dts/lib.webworker.d.ts @@ -379,6 +379,11 @@ interface MultiCacheQueryOptions extends CacheQueryOptions { cacheName?: string; } +interface NavigationPreloadState { + enabled?: boolean; + headerValue?: string; +} + interface NotificationAction { action: string; icon?: string; @@ -475,6 +480,22 @@ interface QueuingStrategyInit { highWaterMark: number; } +interface RTCEncodedAudioFrameMetadata { + contributingSources?: number[]; + synchronizationSource?: number; +} + +interface RTCEncodedVideoFrameMetadata { + contributingSources?: number[]; + dependencies?: number[]; + frameId?: number; + height?: number; + spatialIndex?: number; + synchronizationSource?: number; + temporalIndex?: number; + width?: number; +} + interface ReadableStreamDefaultReadDoneResult { done: true; value?: undefined; @@ -648,6 +669,13 @@ interface UnderlyingSource<R = any> { type?: undefined; } +interface VideoColorSpaceInit { + fullRange?: boolean; + matrix?: VideoMatrixCoefficients; + primaries?: VideoColorPrimaries; + transfer?: VideoTransferCharacteristics; +} + interface VideoConfiguration { bitrate: number; colorGamut?: ColorGamut; @@ -695,7 +723,7 @@ interface AbortController { /** Returns the AbortSignal object associated with this object. */ readonly signal: AbortSignal; /** Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */ - abort(reason?: any): void; + // abort(): AbortSignal; - To be re-added in the future } declare var AbortController: { @@ -712,6 +740,8 @@ interface AbortSignal extends EventTarget { /** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */ readonly aborted: boolean; onabort: ((this: AbortSignal, ev: Event) => any) | null; + readonly reason: any; + throwIfAborted(): void; addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -721,7 +751,7 @@ interface AbortSignal extends EventTarget { declare var AbortSignal: { prototype: AbortSignal; new(): AbortSignal; - // abort(): AbortSignal; - To be re-added in the future + abort(reason?: any): AbortSignal; }; interface AbstractWorkerEventMap { @@ -747,7 +777,7 @@ interface Blob { readonly type: string; arrayBuffer(): Promise<ArrayBuffer>; slice(start?: number, end?: number, contentType?: string): Blob; - stream(): ReadableStream; + stream(): ReadableStream<Uint8Array>; text(): Promise<string>; } @@ -807,13 +837,13 @@ declare var ByteLengthQueuingStrategy: { * Available only in secure contexts. */ interface Cache { - add(request: RequestInfo): Promise<void>; + add(request: RequestInfo | URL): Promise<void>; addAll(requests: RequestInfo[]): Promise<void>; - delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>; - keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>; - match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>; - matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>; - put(request: RequestInfo, response: Response): Promise<void>; + delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<boolean>; + keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>; + match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<Response | undefined>; + matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>; + put(request: RequestInfo | URL, response: Response): Promise<void>; } declare var Cache: { @@ -829,7 +859,7 @@ interface CacheStorage { delete(cacheName: string): Promise<boolean>; has(cacheName: string): Promise<boolean>; keys(): Promise<string[]>; - match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>; + match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise<Response | undefined>; open(cacheName: string): Promise<Cache>; } @@ -1462,6 +1492,7 @@ declare var ExtendableMessageEvent: { interface FetchEvent extends ExtendableEvent { readonly clientId: string; readonly handled: Promise<undefined>; + readonly preloadResponse: Promise<any>; readonly request: Request; readonly resultingClientId: string; respondWith(r: Response | PromiseLike<Response>): void; @@ -2115,6 +2146,7 @@ declare var ImageBitmapRenderingContext: { /** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */ interface ImageData { + readonly colorSpace: PredefinedColorSpace; /** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */ readonly data: Uint8ClampedArray; /** Returns the actual dimensions of the data in the ImageData object, in pixels. */ @@ -2231,6 +2263,19 @@ declare var MessagePort: { new(): MessagePort; }; +/** Available only in secure contexts. */ +interface NavigationPreloadManager { + disable(): Promise<void>; + enable(): Promise<void>; + getState(): Promise<NavigationPreloadState>; + setHeaderValue(value: string): Promise<void>; +} + +declare var NavigationPreloadManager: { + prototype: NavigationPreloadManager; + new(): NavigationPreloadManager; +}; + interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; } @@ -2254,6 +2299,11 @@ interface NavigatorLanguage { readonly languages: ReadonlyArray<string>; } +/** Available only in secure contexts. */ +interface NavigatorLocks { + readonly locks: LockManager; +} + interface NavigatorNetworkInformation { readonly connection: NetworkInformation; } @@ -2629,6 +2679,29 @@ declare var PushSubscriptionOptions: { new(): PushSubscriptionOptions; }; +interface RTCEncodedAudioFrame { + data: ArrayBuffer; + readonly timestamp: number; + getMetadata(): RTCEncodedAudioFrameMetadata; +} + +declare var RTCEncodedAudioFrame: { + prototype: RTCEncodedAudioFrame; + new(): RTCEncodedAudioFrame; +}; + +interface RTCEncodedVideoFrame { + data: ArrayBuffer; + readonly timestamp: number; + readonly type: RTCEncodedVideoFrameType; + getMetadata(): RTCEncodedVideoFrameMetadata; +} + +declare var RTCEncodedVideoFrame: { + prototype: RTCEncodedVideoFrame; + new(): RTCEncodedVideoFrame; +}; + /** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */ interface ReadableStream<R = any> { readonly locked: boolean; @@ -2704,7 +2777,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** This Fetch API interface represents the response to a request. */ @@ -2849,6 +2922,7 @@ interface ServiceWorkerRegistrationEventMap { interface ServiceWorkerRegistration extends EventTarget { readonly active: ServiceWorker | null; readonly installing: ServiceWorker | null; + readonly navigationPreload: NavigationPreloadManager; onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; readonly pushManager: PushManager; readonly scope: string; @@ -2914,10 +2988,10 @@ interface SubtleCrypto { encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>; exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>; exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>; - generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + 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: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>; - importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>; unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; @@ -3095,6 +3169,19 @@ declare var URLSearchParams: { toString(): string; }; +interface VideoColorSpace { + readonly fullRange: boolean | null; + readonly matrix: VideoMatrixCoefficients | null; + readonly primaries: VideoColorPrimaries | null; + readonly transfer: VideoTransferCharacteristics | null; + toJSON(): VideoColorSpaceInit; +} + +declare var VideoColorSpace: { + prototype: VideoColorSpace; + new(init?: VideoColorSpaceInit): VideoColorSpace; +}; + interface WEBGL_color_buffer_float { readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum; readonly RGBA32F_EXT: GLenum; @@ -3150,13 +3237,6 @@ interface WEBGL_compressed_texture_etc1 { readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum; } -interface WEBGL_compressed_texture_pvrtc { - readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: GLenum; - readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: GLenum; - readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG: GLenum; - readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG: GLenum; -} - /** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */ interface WEBGL_compressed_texture_s3tc { readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum; @@ -4647,7 +4727,6 @@ interface WebGLRenderingContextBase { getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null; getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null; getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null; - getExtension(extensionName: "WEBGL_compressed_texture_pvrtc"): WEBGL_compressed_texture_pvrtc | null; getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null; getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null; getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null; @@ -5203,11 +5282,12 @@ interface WindowOrWorkerGlobalScope { clearTimeout(id?: number): void; createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>; - fetch(input: RequestInfo, init?: RequestInit): Promise<Response>; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>; queueMicrotask(callback: VoidFunction): void; reportError(e: any): void; setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; + structuredClone(value: any, options?: StructuredSerializeOptions): any; } interface WorkerEventMap extends AbstractWorkerEventMap { @@ -5291,7 +5371,7 @@ declare var WorkerLocation: { }; /** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */ -interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage { +interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage { readonly mediaCapabilities: MediaCapabilities; } @@ -5742,11 +5822,12 @@ declare function clearInterval(id?: number): void; declare function clearTimeout(id?: number): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>; -declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>; declare function queueMicrotask(callback: VoidFunction): void; declare function reportError(e: any): void; declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; +declare function structuredClone(value: any, options?: StructuredSerializeOptions): any; declare function cancelAnimationFrame(handle: number): void; 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; @@ -5827,6 +5908,7 @@ type PermissionState = "denied" | "granted" | "prompt"; type PredefinedColorSpace = "display-p3" | "srgb"; type PremultiplyAlpha = "default" | "none" | "premultiply"; type PushEncryptionKeyName = "auth" | "p256dh"; +type RTCEncodedVideoFrameType = "delta" | "empty" | "key"; type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url"; type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload"; type RequestCredentials = "include" | "omit" | "same-origin"; @@ -5839,6 +5921,9 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; type TransferFunction = "hlg" | "pq" | "srgb"; +type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m"; +type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m"; +type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m"; type WebGLPowerPreference = "default" | "high-performance" | "low-power"; type WorkerType = "classic" | "module"; type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; diff --git a/cli/dts/lib.webworker.iterable.d.ts b/cli/dts/lib.webworker.iterable.d.ts index 9f39fc026..af2588150 100644 --- a/cli/dts/lib.webworker.iterable.d.ts +++ b/cli/dts/lib.webworker.iterable.d.ts @@ -78,10 +78,10 @@ interface MessageEvent<T = any> { interface SubtleCrypto { deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>; - generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + 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>; - importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; } diff --git a/cli/dts/typescript.d.ts b/cli/dts/typescript.d.ts index 0c1763205..fb0a5a0c1 100644 --- a/cli/dts/typescript.d.ts +++ b/cli/dts/typescript.d.ts @@ -14,7 +14,7 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "4.6"; + const versionMajorMinor = "4.7"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -249,216 +249,219 @@ declare namespace ts { ModuleKeyword = 141, NamespaceKeyword = 142, NeverKeyword = 143, - ReadonlyKeyword = 144, - RequireKeyword = 145, - NumberKeyword = 146, - ObjectKeyword = 147, - SetKeyword = 148, - StringKeyword = 149, - SymbolKeyword = 150, - TypeKeyword = 151, - UndefinedKeyword = 152, - UniqueKeyword = 153, - UnknownKeyword = 154, - FromKeyword = 155, - GlobalKeyword = 156, - BigIntKeyword = 157, - OverrideKeyword = 158, - OfKeyword = 159, - QualifiedName = 160, - ComputedPropertyName = 161, - TypeParameter = 162, - Parameter = 163, - Decorator = 164, - PropertySignature = 165, - PropertyDeclaration = 166, - MethodSignature = 167, - MethodDeclaration = 168, - ClassStaticBlockDeclaration = 169, - Constructor = 170, - GetAccessor = 171, - SetAccessor = 172, - CallSignature = 173, - ConstructSignature = 174, - IndexSignature = 175, - TypePredicate = 176, - TypeReference = 177, - FunctionType = 178, - ConstructorType = 179, - TypeQuery = 180, - TypeLiteral = 181, - ArrayType = 182, - TupleType = 183, - OptionalType = 184, - RestType = 185, - UnionType = 186, - IntersectionType = 187, - ConditionalType = 188, - InferType = 189, - ParenthesizedType = 190, - ThisType = 191, - TypeOperator = 192, - IndexedAccessType = 193, - MappedType = 194, - LiteralType = 195, - NamedTupleMember = 196, - TemplateLiteralType = 197, - TemplateLiteralTypeSpan = 198, - ImportType = 199, - ObjectBindingPattern = 200, - ArrayBindingPattern = 201, - BindingElement = 202, - ArrayLiteralExpression = 203, - ObjectLiteralExpression = 204, - PropertyAccessExpression = 205, - ElementAccessExpression = 206, - CallExpression = 207, - NewExpression = 208, - TaggedTemplateExpression = 209, - TypeAssertionExpression = 210, - ParenthesizedExpression = 211, - FunctionExpression = 212, - ArrowFunction = 213, - DeleteExpression = 214, - TypeOfExpression = 215, - VoidExpression = 216, - AwaitExpression = 217, - PrefixUnaryExpression = 218, - PostfixUnaryExpression = 219, - BinaryExpression = 220, - ConditionalExpression = 221, - TemplateExpression = 222, - YieldExpression = 223, - SpreadElement = 224, - ClassExpression = 225, - OmittedExpression = 226, - ExpressionWithTypeArguments = 227, - AsExpression = 228, - NonNullExpression = 229, - MetaProperty = 230, - SyntheticExpression = 231, - TemplateSpan = 232, - SemicolonClassElement = 233, - Block = 234, - EmptyStatement = 235, - VariableStatement = 236, - ExpressionStatement = 237, - IfStatement = 238, - DoStatement = 239, - WhileStatement = 240, - ForStatement = 241, - ForInStatement = 242, - ForOfStatement = 243, - ContinueStatement = 244, - BreakStatement = 245, - ReturnStatement = 246, - WithStatement = 247, - SwitchStatement = 248, - LabeledStatement = 249, - ThrowStatement = 250, - TryStatement = 251, - DebuggerStatement = 252, - VariableDeclaration = 253, - VariableDeclarationList = 254, - FunctionDeclaration = 255, - ClassDeclaration = 256, - InterfaceDeclaration = 257, - TypeAliasDeclaration = 258, - EnumDeclaration = 259, - ModuleDeclaration = 260, - ModuleBlock = 261, - CaseBlock = 262, - NamespaceExportDeclaration = 263, - ImportEqualsDeclaration = 264, - ImportDeclaration = 265, - ImportClause = 266, - NamespaceImport = 267, - NamedImports = 268, - ImportSpecifier = 269, - ExportAssignment = 270, - ExportDeclaration = 271, - NamedExports = 272, - NamespaceExport = 273, - ExportSpecifier = 274, - MissingDeclaration = 275, - ExternalModuleReference = 276, - JsxElement = 277, - JsxSelfClosingElement = 278, - JsxOpeningElement = 279, - JsxClosingElement = 280, - JsxFragment = 281, - JsxOpeningFragment = 282, - JsxClosingFragment = 283, - JsxAttribute = 284, - JsxAttributes = 285, - JsxSpreadAttribute = 286, - JsxExpression = 287, - CaseClause = 288, - DefaultClause = 289, - HeritageClause = 290, - CatchClause = 291, - AssertClause = 292, - AssertEntry = 293, - PropertyAssignment = 294, - ShorthandPropertyAssignment = 295, - SpreadAssignment = 296, - EnumMember = 297, - UnparsedPrologue = 298, - UnparsedPrepend = 299, - UnparsedText = 300, - UnparsedInternalText = 301, - UnparsedSyntheticReference = 302, - SourceFile = 303, - Bundle = 304, - UnparsedSource = 305, - InputFiles = 306, - JSDocTypeExpression = 307, - JSDocNameReference = 308, - JSDocMemberName = 309, - JSDocAllType = 310, - JSDocUnknownType = 311, - JSDocNullableType = 312, - JSDocNonNullableType = 313, - JSDocOptionalType = 314, - JSDocFunctionType = 315, - JSDocVariadicType = 316, - JSDocNamepathType = 317, - JSDocComment = 318, - JSDocText = 319, - JSDocTypeLiteral = 320, - JSDocSignature = 321, - JSDocLink = 322, - JSDocLinkCode = 323, - JSDocLinkPlain = 324, - JSDocTag = 325, - JSDocAugmentsTag = 326, - JSDocImplementsTag = 327, - JSDocAuthorTag = 328, - JSDocDeprecatedTag = 329, - JSDocClassTag = 330, - JSDocPublicTag = 331, - JSDocPrivateTag = 332, - JSDocProtectedTag = 333, - JSDocReadonlyTag = 334, - JSDocOverrideTag = 335, - JSDocCallbackTag = 336, - JSDocEnumTag = 337, - JSDocParameterTag = 338, - JSDocReturnTag = 339, - JSDocThisTag = 340, - JSDocTypeTag = 341, - JSDocTemplateTag = 342, - JSDocTypedefTag = 343, - JSDocSeeTag = 344, - JSDocPropertyTag = 345, - SyntaxList = 346, - NotEmittedStatement = 347, - PartiallyEmittedExpression = 348, - CommaListExpression = 349, - MergeDeclarationMarker = 350, - EndOfDeclarationMarker = 351, - SyntheticReferenceExpression = 352, - Count = 353, + OutKeyword = 144, + ReadonlyKeyword = 145, + RequireKeyword = 146, + NumberKeyword = 147, + ObjectKeyword = 148, + SetKeyword = 149, + StringKeyword = 150, + SymbolKeyword = 151, + TypeKeyword = 152, + UndefinedKeyword = 153, + UniqueKeyword = 154, + UnknownKeyword = 155, + FromKeyword = 156, + GlobalKeyword = 157, + BigIntKeyword = 158, + OverrideKeyword = 159, + OfKeyword = 160, + QualifiedName = 161, + ComputedPropertyName = 162, + TypeParameter = 163, + Parameter = 164, + Decorator = 165, + PropertySignature = 166, + PropertyDeclaration = 167, + MethodSignature = 168, + MethodDeclaration = 169, + ClassStaticBlockDeclaration = 170, + Constructor = 171, + GetAccessor = 172, + SetAccessor = 173, + CallSignature = 174, + ConstructSignature = 175, + IndexSignature = 176, + TypePredicate = 177, + TypeReference = 178, + FunctionType = 179, + ConstructorType = 180, + TypeQuery = 181, + TypeLiteral = 182, + ArrayType = 183, + TupleType = 184, + OptionalType = 185, + RestType = 186, + UnionType = 187, + IntersectionType = 188, + ConditionalType = 189, + InferType = 190, + ParenthesizedType = 191, + ThisType = 192, + TypeOperator = 193, + IndexedAccessType = 194, + MappedType = 195, + LiteralType = 196, + NamedTupleMember = 197, + TemplateLiteralType = 198, + TemplateLiteralTypeSpan = 199, + ImportType = 200, + ObjectBindingPattern = 201, + ArrayBindingPattern = 202, + BindingElement = 203, + ArrayLiteralExpression = 204, + ObjectLiteralExpression = 205, + PropertyAccessExpression = 206, + ElementAccessExpression = 207, + CallExpression = 208, + NewExpression = 209, + TaggedTemplateExpression = 210, + TypeAssertionExpression = 211, + ParenthesizedExpression = 212, + FunctionExpression = 213, + ArrowFunction = 214, + DeleteExpression = 215, + TypeOfExpression = 216, + VoidExpression = 217, + AwaitExpression = 218, + PrefixUnaryExpression = 219, + PostfixUnaryExpression = 220, + BinaryExpression = 221, + ConditionalExpression = 222, + TemplateExpression = 223, + YieldExpression = 224, + SpreadElement = 225, + ClassExpression = 226, + OmittedExpression = 227, + ExpressionWithTypeArguments = 228, + AsExpression = 229, + NonNullExpression = 230, + MetaProperty = 231, + SyntheticExpression = 232, + TemplateSpan = 233, + SemicolonClassElement = 234, + Block = 235, + EmptyStatement = 236, + VariableStatement = 237, + ExpressionStatement = 238, + IfStatement = 239, + DoStatement = 240, + WhileStatement = 241, + ForStatement = 242, + ForInStatement = 243, + ForOfStatement = 244, + ContinueStatement = 245, + BreakStatement = 246, + ReturnStatement = 247, + WithStatement = 248, + SwitchStatement = 249, + LabeledStatement = 250, + ThrowStatement = 251, + TryStatement = 252, + DebuggerStatement = 253, + VariableDeclaration = 254, + VariableDeclarationList = 255, + FunctionDeclaration = 256, + ClassDeclaration = 257, + InterfaceDeclaration = 258, + TypeAliasDeclaration = 259, + EnumDeclaration = 260, + ModuleDeclaration = 261, + ModuleBlock = 262, + CaseBlock = 263, + NamespaceExportDeclaration = 264, + ImportEqualsDeclaration = 265, + ImportDeclaration = 266, + ImportClause = 267, + NamespaceImport = 268, + NamedImports = 269, + ImportSpecifier = 270, + ExportAssignment = 271, + ExportDeclaration = 272, + NamedExports = 273, + NamespaceExport = 274, + ExportSpecifier = 275, + MissingDeclaration = 276, + ExternalModuleReference = 277, + JsxElement = 278, + JsxSelfClosingElement = 279, + JsxOpeningElement = 280, + JsxClosingElement = 281, + JsxFragment = 282, + JsxOpeningFragment = 283, + JsxClosingFragment = 284, + JsxAttribute = 285, + JsxAttributes = 286, + JsxSpreadAttribute = 287, + JsxExpression = 288, + CaseClause = 289, + DefaultClause = 290, + HeritageClause = 291, + CatchClause = 292, + AssertClause = 293, + AssertEntry = 294, + ImportTypeAssertionContainer = 295, + PropertyAssignment = 296, + ShorthandPropertyAssignment = 297, + SpreadAssignment = 298, + EnumMember = 299, + UnparsedPrologue = 300, + UnparsedPrepend = 301, + UnparsedText = 302, + UnparsedInternalText = 303, + UnparsedSyntheticReference = 304, + SourceFile = 305, + Bundle = 306, + UnparsedSource = 307, + InputFiles = 308, + JSDocTypeExpression = 309, + JSDocNameReference = 310, + JSDocMemberName = 311, + JSDocAllType = 312, + JSDocUnknownType = 313, + JSDocNullableType = 314, + JSDocNonNullableType = 315, + JSDocOptionalType = 316, + JSDocFunctionType = 317, + JSDocVariadicType = 318, + JSDocNamepathType = 319, + /** @deprecated Use SyntaxKind.JSDoc */ + JSDocComment = 320, + JSDocText = 321, + JSDocTypeLiteral = 322, + JSDocSignature = 323, + JSDocLink = 324, + JSDocLinkCode = 325, + JSDocLinkPlain = 326, + JSDocTag = 327, + JSDocAugmentsTag = 328, + JSDocImplementsTag = 329, + JSDocAuthorTag = 330, + JSDocDeprecatedTag = 331, + JSDocClassTag = 332, + JSDocPublicTag = 333, + JSDocPrivateTag = 334, + JSDocProtectedTag = 335, + JSDocReadonlyTag = 336, + JSDocOverrideTag = 337, + JSDocCallbackTag = 338, + JSDocEnumTag = 339, + JSDocParameterTag = 340, + JSDocReturnTag = 341, + JSDocThisTag = 342, + JSDocTypeTag = 343, + JSDocTemplateTag = 344, + JSDocTypedefTag = 345, + JSDocSeeTag = 346, + JSDocPropertyTag = 347, + SyntaxList = 348, + NotEmittedStatement = 349, + PartiallyEmittedExpression = 350, + CommaListExpression = 351, + MergeDeclarationMarker = 352, + EndOfDeclarationMarker = 353, + SyntheticReferenceExpression = 354, + Count = 355, FirstAssignment = 63, LastAssignment = 78, FirstCompoundAssignment = 64, @@ -466,15 +469,15 @@ declare namespace ts { FirstReservedWord = 81, LastReservedWord = 116, FirstKeyword = 81, - LastKeyword = 159, + LastKeyword = 160, FirstFutureReservedWord = 117, LastFutureReservedWord = 125, - FirstTypeNode = 176, - LastTypeNode = 199, + FirstTypeNode = 177, + LastTypeNode = 200, FirstPunctuation = 18, LastPunctuation = 78, FirstToken = 0, - LastToken = 159, + LastToken = 160, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -483,20 +486,21 @@ declare namespace ts { LastTemplateToken = 17, FirstBinaryOperator = 29, LastBinaryOperator = 78, - FirstStatement = 236, - LastStatement = 252, - FirstNode = 160, - FirstJSDocNode = 307, - LastJSDocNode = 345, - FirstJSDocTagNode = 325, - LastJSDocTagNode = 345, + FirstStatement = 237, + LastStatement = 253, + FirstNode = 161, + FirstJSDocNode = 309, + LastJSDocNode = 347, + FirstJSDocTagNode = 327, + LastJSDocTagNode = 347, + JSDoc = 320 } export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; - export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; - export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; + export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; + export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; @@ -519,16 +523,17 @@ declare namespace ts { YieldContext = 8192, DecoratorContext = 16384, AwaitContext = 32768, - ThisNodeHasError = 65536, - JavaScriptFile = 131072, - ThisNodeOrAnySubNodesHasError = 262144, - HasAggregatedChildData = 524288, - JSDoc = 4194304, - JsonFile = 33554432, + DisallowConditionalTypesContext = 65536, + ThisNodeHasError = 131072, + JavaScriptFile = 262144, + ThisNodeOrAnySubNodesHasError = 524288, + HasAggregatedChildData = 1048576, + JSDoc = 8388608, + JsonFile = 67108864, BlockScoped = 3, ReachabilityCheckFlags = 768, ReachabilityAndEmitFlags = 2816, - ContextFlags = 25358336, + ContextFlags = 50720768, TypeExcludesFlags = 40960, } export enum ModifierFlags { @@ -547,13 +552,15 @@ declare namespace ts { HasComputedJSDocModifiers = 4096, Deprecated = 8192, Override = 16384, + In = 32768, + Out = 65536, HasComputedFlags = 536870912, AccessibilityModifier = 28, ParameterPropertyModifier = 16476, NonPublicAccessibilityModifier = 24, - TypeScriptModifier = 18654, + TypeScriptModifier = 116958, ExportDefault = 513, - All = 27647 + All = 125951 } export enum JsxFlags { None = 0, @@ -572,7 +579,7 @@ declare namespace ts { } export interface JSDocContainer { } - export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | EndOfFileToken; + export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | CaseClause | EndOfFileToken; export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement; export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute; @@ -614,15 +621,17 @@ declare namespace ts { export type DeclareKeyword = ModifierToken<SyntaxKind.DeclareKeyword>; export type DefaultKeyword = ModifierToken<SyntaxKind.DefaultKeyword>; export type ExportKeyword = ModifierToken<SyntaxKind.ExportKeyword>; + export type InKeyword = ModifierToken<SyntaxKind.InKeyword>; export type PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>; export type ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>; export type PublicKeyword = ModifierToken<SyntaxKind.PublicKeyword>; export type ReadonlyKeyword = ModifierToken<SyntaxKind.ReadonlyKeyword>; + export type OutKeyword = ModifierToken<SyntaxKind.OutKeyword>; export type OverrideKeyword = ModifierToken<SyntaxKind.OverrideKeyword>; export type StaticKeyword = ModifierToken<SyntaxKind.StaticKeyword>; /** @deprecated Use `ReadonlyKeyword` instead. */ export type ReadonlyToken = ReadonlyKeyword; - export type Modifier = AbstractKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword; + export type Modifier = AbstractKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OutKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword; export type AccessibilityModifier = PublicKeyword | PrivateKeyword | ProtectedKeyword; export type ParameterPropertyModifier = AccessibilityModifier | ReadonlyKeyword; export type ClassMemberModifier = AccessibilityModifier | ReadonlyKeyword | StaticKeyword; @@ -866,10 +875,17 @@ declare namespace ts { export interface KeywordTypeNode<TKind extends KeywordTypeSyntaxKind = KeywordTypeSyntaxKind> extends KeywordToken<TKind>, TypeNode { readonly kind: TKind; } + export interface ImportTypeAssertionContainer extends Node { + readonly kind: SyntaxKind.ImportTypeAssertionContainer; + readonly parent: ImportTypeNode; + readonly assertClause: AssertClause; + readonly multiLine?: boolean; + } export interface ImportTypeNode extends NodeWithTypeArguments { readonly kind: SyntaxKind.ImportType; readonly isTypeOf: boolean; readonly argument: TypeNode; + readonly assertions?: ImportTypeAssertionContainer; readonly qualifier?: EntityName; } export interface ThisTypeNode extends TypeNode { @@ -901,7 +917,7 @@ declare namespace ts { readonly parameterName: Identifier | ThisTypeNode; readonly type?: TypeNode; } - export interface TypeQueryNode extends TypeNode { + export interface TypeQueryNode extends NodeWithTypeArguments { readonly kind: SyntaxKind.TypeQuery; readonly exprName: EntityName; } @@ -1285,9 +1301,8 @@ declare namespace ts { export interface ImportCall extends CallExpression { readonly expression: ImportExpression; } - export interface ExpressionWithTypeArguments extends NodeWithTypeArguments { + export interface ExpressionWithTypeArguments extends MemberExpression, NodeWithTypeArguments { readonly kind: SyntaxKind.ExpressionWithTypeArguments; - readonly parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag; readonly expression: LeftHandSideExpression; } export interface NewExpression extends PrimaryExpression, Declaration { @@ -1498,7 +1513,7 @@ declare namespace ts { readonly parent: SwitchStatement; readonly clauses: NodeArray<CaseOrDefaultClause>; } - export interface CaseClause extends Node { + export interface CaseClause extends Node, JSDocContainer { readonly kind: SyntaxKind.CaseClause; readonly parent: CaseBlock; readonly expression: Expression; @@ -1749,6 +1764,7 @@ declare namespace ts { } export interface FileReference extends TextRange { fileName: string; + resolutionMode?: SourceFile["impliedNodeFormat"]; } export interface CheckJsDirective extends TextRange { enabled: boolean; @@ -1790,10 +1806,12 @@ declare namespace ts { export interface JSDocNonNullableType extends JSDocType { readonly kind: SyntaxKind.JSDocNonNullableType; readonly type: TypeNode; + readonly postfix: boolean; } export interface JSDocNullableType extends JSDocType { readonly kind: SyntaxKind.JSDocNullableType; readonly type: TypeNode; + readonly postfix: boolean; } export interface JSDocOptionalType extends JSDocType { readonly kind: SyntaxKind.JSDocOptionalType; @@ -1812,7 +1830,7 @@ declare namespace ts { } export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType; export interface JSDoc extends Node { - readonly kind: SyntaxKind.JSDocComment; + readonly kind: SyntaxKind.JSDoc; readonly parent: HasJSDoc; readonly tags?: NodeArray<JSDocTag>; readonly comment?: string | NodeArray<JSDocComment>; @@ -1968,7 +1986,7 @@ declare namespace ts { Label = 12, Condition = 96 } - export type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCall | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel; + export type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel; export interface FlowNodeBase { flags: FlowFlags; id?: number; @@ -2015,6 +2033,12 @@ declare namespace ts { path: string; name?: string; } + /** + * Subset of properties from SourceFile that are used in multiple utility functions + */ + export interface SourceFileLike { + readonly text: string; + } export interface SourceFile extends Declaration { readonly kind: SyntaxKind.SourceFile; readonly statements: NodeArray<Statement>; @@ -2039,7 +2063,7 @@ declare namespace ts { hasNoDefaultLib: boolean; languageVersion: ScriptTarget; /** - * When `module` is `Node12` or `NodeNext`, this field controls whether the + * When `module` is `Node16` or `NodeNext`, this field controls whether the * source file in question is an ESNext-output-format file, or a CommonJS-output-format * module. This is derived by the module resolver as it looks up the file, since * it is derived from either the file extension of the module, or the containing @@ -2074,7 +2098,7 @@ declare namespace ts { readonly prologues: readonly UnparsedPrologue[]; helpers: readonly UnscopedEmitHelper[] | undefined; referencedFiles: readonly FileReference[]; - typeReferenceDirectives: readonly string[] | undefined; + typeReferenceDirectives: readonly FileReference[] | undefined; libReferenceDirectives: readonly FileReference[]; hasNoDefaultLib?: boolean; sourceMapPath?: string; @@ -2148,7 +2172,9 @@ declare namespace ts { export type ResolvedConfigFileName = string & { _isResolvedConfigFileName: never; }; - export type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[]) => void; + export interface WriteFileCallbackData { + } + export type WriteFileCallback = (fileName: string, text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) => void; export class OperationCanceledException { } export interface CancellationToken { @@ -2370,7 +2396,6 @@ declare namespace ts { UseAliasDefinedOutsideCurrentScope = 16384, UseSingleQuotesForStringLiteralType = 268435456, NoTypeReduction = 536870912, - NoUndefinedOptionalParameterType = 1073741824, AllowThisInObjectLiteral = 32768, AllowQualifiedNameInPlaceOfIdentifier = 65536, /** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */ @@ -2654,13 +2679,13 @@ declare namespace ts { ObjectLiteralPatternWithComputedProperties = 512, ReverseMapped = 1024, JsxAttributes = 2048, - MarkerType = 4096, - JSLiteral = 8192, - FreshLiteral = 16384, - ArrayLiteral = 32768, + JSLiteral = 4096, + FreshLiteral = 8192, + ArrayLiteral = 16384, ClassOrInterface = 3, - ContainsSpread = 4194304, - ObjectRestType = 8388608, + ContainsSpread = 2097152, + ObjectRestType = 4194304, + InstantiationExpressionType = 8388608, } export interface ObjectType extends Type { objectFlags: ObjectFlags; @@ -2868,9 +2893,23 @@ declare namespace ts { export enum ModuleResolutionKind { Classic = 1, NodeJs = 2, - Node12 = 3, + Node16 = 3, NodeNext = 99 } + export enum ModuleDetectionKind { + /** + * Files with imports, exports and/or import.meta are considered modules + */ + Legacy = 1, + /** + * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+ + */ + Auto = 2, + /** + * Consider all non-declaration files modules, regardless of present syntax + */ + Force = 3 + } export interface PluginImport { name: string; } @@ -2942,6 +2981,8 @@ declare namespace ts { maxNodeModuleJsDepth?: number; module?: ModuleKind; moduleResolution?: ModuleResolutionKind; + moduleSuffixes?: string[]; + moduleDetection?: ModuleDetectionKind; newLine?: NewLineKind; noEmit?: boolean; noEmitHelpers?: boolean; @@ -3033,7 +3074,7 @@ declare namespace ts { ES2020 = 6, ES2022 = 7, ESNext = 99, - Node12 = 100, + Node16 = 100, NodeNext = 199 } export enum JsxEmit { @@ -3127,7 +3168,14 @@ declare namespace ts { realpath?(path: string): string; getCurrentDirectory?(): string; getDirectories?(path: string): string[]; - useCaseSensitiveFileNames?: boolean | (() => boolean); + useCaseSensitiveFileNames?: boolean | (() => boolean) | undefined; + } + /** + * Used by services to specify the minimum host area required to set up source files under any compilation settings + */ + export interface MinimalResolutionCacheHost extends ModuleResolutionHost { + getCompilationSettings(): CompilerOptions; + getCompilerHost?(): CompilerHost | undefined; } /** * Represents the result of module resolution. @@ -3204,8 +3252,8 @@ declare namespace ts { readonly failedLookupLocations: string[]; } export interface CompilerHost extends ModuleResolutionHost { - getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; - getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; + getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; + getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; getCancellationToken?(): CancellationToken; getDefaultLibFileName(options: CompilerOptions): string; getDefaultLibLocation?(): string; @@ -3223,7 +3271,7 @@ declare namespace ts { /** * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files */ - resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[]; + resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; getEnvironmentVariable?(name: string): string | undefined; createHash?(data: string): string; getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; @@ -3353,7 +3401,11 @@ declare namespace ts { updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName; createComputedPropertyName(expression: Expression): ComputedPropertyName; updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName; + createTypeParameterDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; + /** @deprecated */ createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; + updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; + /** @deprecated */ updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; updateParameterDeclaration(node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; @@ -3396,8 +3448,8 @@ declare namespace ts { updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode; /** @deprecated */ updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode; - createTypeQueryNode(exprName: EntityName): TypeQueryNode; - updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode; + createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; + updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode; updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode; createArrayTypeNode(elementType: TypeNode): ArrayTypeNode; @@ -3419,7 +3471,9 @@ declare namespace ts { createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode; updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode; createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; + createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; + updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; createParenthesizedType(type: TypeNode): ParenthesizedTypeNode; updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode; createThisTypeNode(): ThisTypeNode; @@ -3582,6 +3636,8 @@ declare namespace ts { updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause; createAssertEntry(name: AssertionKey, value: Expression): AssertEntry; updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry; + createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; + updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; createNamespaceImport(name: Identifier): NamespaceImport; updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport; createNamespaceExport(name: Identifier): NamespaceExport; @@ -3602,9 +3658,9 @@ declare namespace ts { updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference; createJSDocAllType(): JSDocAllType; createJSDocUnknownType(): JSDocUnknownType; - createJSDocNonNullableType(type: TypeNode): JSDocNonNullableType; + createJSDocNonNullableType(type: TypeNode, postfix?: boolean): JSDocNonNullableType; updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType; - createJSDocNullableType(type: TypeNode): JSDocNullableType; + createJSDocNullableType(type: TypeNode, postfix?: boolean): JSDocNullableType; updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType; createJSDocOptionalType(type: TypeNode): JSDocOptionalType; updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType; @@ -4048,6 +4104,8 @@ declare namespace ts { readonly includeAutomaticOptionalChainCompletions?: boolean; readonly includeCompletionsWithInsertText?: boolean; readonly includeCompletionsWithClassMemberSnippets?: boolean; + readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; + readonly useLabelDetailsInCompletionEntries?: boolean; readonly allowIncompleteCompletions?: boolean; readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative"; /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ @@ -4057,6 +4115,13 @@ declare namespace ts { readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; readonly provideRefactorNotApplicableReason?: boolean; readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none"; + readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; + readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; + readonly includeInlayFunctionParameterTypeHints?: boolean; + readonly includeInlayVariableTypeHints?: boolean; + readonly includeInlayPropertyDeclarationTypeHints?: boolean; + readonly includeInlayFunctionLikeReturnTypeHints?: boolean; + readonly includeInlayEnumMemberValueHints?: boolean; } /** Represents a bigint literal value without requiring bigint support */ export interface PseudoBigInt { @@ -4748,7 +4813,22 @@ declare namespace ts { * that they appear in the source code. The language service depends on this property to locate nodes by position. */ export function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined; - export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile; + export interface CreateSourceFileOptions { + languageVersion: ScriptTarget; + /** + * Controls the format the file is detected as - this can be derived from only the path + * and files on disk, but needs to be done with a module resolution cache in scope to be performant. + * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. + */ + impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS; + /** + * Controls how module-y-ness is set for the given file. Usually the result of calling + * `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default + * check specified by `isFileProbablyExternalModule` will be used to set the field. + */ + setExternalModuleIndicator?: (file: SourceFile) => void; + } + export function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile; export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined; /** * Parse json text into SyntaxTree and return node and parse errors if any @@ -4855,7 +4935,7 @@ declare namespace ts { * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups * is assumed to be the same as root directory of the project. */ - export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache): ResolvedTypeReferenceDirectiveWithFailedLookupLocations; + export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: SourceFile["impliedNodeFormat"]): ResolvedTypeReferenceDirectiveWithFailedLookupLocations; /** * Given a set of options, returns the set of type directive names * that should be included for this program automatically. @@ -5276,7 +5356,7 @@ declare namespace ts { /** If provided, used to resolve the module names, otherwise typescript's default module resolution */ resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */ - resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[]; + resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; } interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost { /** Instead of using output d.ts file from project reference, use its source file */ @@ -5648,7 +5728,7 @@ declare namespace ts { set(response: CompletionInfo): void; clear(): void; } - interface LanguageServiceHost extends GetEffectiveTypeRootsHost { + interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalResolutionCacheHost { getCompilationSettings(): CompilerOptions; getNewLine?(): string; getProjectVersion?(): string; @@ -5666,13 +5746,13 @@ declare namespace ts { error?(s: string): void; useCaseSensitiveFileNames?(): boolean; readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; - readFile?(path: string, encoding?: string): string | undefined; realpath?(path: string): string; - fileExists?(path: string): boolean; + readFile(path: string, encoding?: string): string | undefined; + fileExists(path: string): boolean; getTypeRootsVersion?(): number; resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined; - resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[]; + resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; getDirectories?(directoryName: string): string[]; /** * Gets a set of custom transformers to use during emit. @@ -5881,15 +5961,6 @@ declare namespace ts { /** @deprecated Use includeCompletionsWithInsertText */ includeInsertTextCompletions?: boolean; } - interface InlayHintsOptions extends UserPreferences { - readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; - readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; - readonly includeInlayFunctionParameterTypeHints?: boolean; - readonly includeInlayVariableTypeHints?: boolean; - readonly includeInlayPropertyDeclarationTypeHints?: boolean; - readonly includeInlayFunctionLikeReturnTypeHints?: boolean; - readonly includeInlayEnumMemberValueHints?: boolean; - } type SignatureHelpTriggerCharacter = "," | "(" | "<"; type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")"; interface SignatureHelpItemsOptions { @@ -6139,7 +6210,6 @@ declare namespace ts { } interface ReferenceEntry extends DocumentSpan { isWriteAccess: boolean; - isDefinition: boolean; isInString?: true; } interface ImplementationLocation extends DocumentSpan { @@ -6253,7 +6323,10 @@ declare namespace ts { } interface ReferencedSymbol { definition: ReferencedSymbolDefinitionInfo; - references: ReferenceEntry[]; + references: ReferencedSymbolEntry[]; + } + interface ReferencedSymbolEntry extends ReferenceEntry { + isDefinition?: boolean; } enum SymbolDisplayPartKind { aliasName = 0, @@ -6362,7 +6435,18 @@ declare namespace ts { argumentIndex: number; argumentCount: number; } + enum CompletionInfoFlags { + None = 0, + MayIncludeAutoImports = 1, + IsImportStatementCompletion = 2, + IsContinuation = 4, + ResolvedModuleSpecifiers = 8, + ResolvedModuleSpecifiersBeyondLimit = 16, + MayIncludeMethodSnippets = 32 + } interface CompletionInfo { + /** For performance telemetry. */ + flags?: CompletionInfoFlags; /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ isGlobalCompletion: boolean; isMemberCompletion: boolean; @@ -6420,6 +6504,7 @@ declare namespace ts { hasAction?: true; source?: string; sourceDisplay?: SymbolDisplayPart[]; + labelDetails?: CompletionEntryLabelDetails; isRecommended?: true; isFromUncheckedFile?: true; isPackageJsonImport?: true; @@ -6434,6 +6519,10 @@ declare namespace ts { */ data?: CompletionEntryData; } + interface CompletionEntryLabelDetails { + detail?: string; + description?: string; + } interface CompletionEntryDetails { name: string; kind: ScriptElementKind; @@ -6693,7 +6782,7 @@ declare namespace ts { cancellationToken: CancellationToken; host: LanguageServiceHost; span: TextSpan; - preferences: InlayHintsOptions; + preferences: UserPreferences; } } declare namespace ts { @@ -6729,30 +6818,36 @@ declare namespace ts { * the SourceFile if was not found in the registry. * * @param fileName The name of the file requested - * @param compilationSettings Some compilation settings like target affects the + * @param compilationSettingsOrHost Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. + * multiple copies of the same file for different compilation settings. A minimal + * resolution cache is needed to fully define a source file's shape when + * the compilation settings include `module: node16`+, so providing a cache host + * object should be preferred. A common host is a language service `ConfiguredProject`. * @param scriptSnapshot Text of the file. Only used if the file was not found * in the registry and a new one was created. * @param version Current version of the file. Only used if the file was not found * in the registry and a new one was created. */ - acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; - acquireDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; + acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; + acquireDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; /** * Request an updated version of an already existing SourceFile with a given fileName * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile * to get an updated SourceFile. * * @param fileName The name of the file requested - * @param compilationSettings Some compilation settings like target affects the + * @param compilationSettingsOrHost Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. + * multiple copies of the same file for different compilation settings. A minimal + * resolution cache is needed to fully define a source file's shape when + * the compilation settings include `module: node16`+, so providing a cache host + * object should be preferred. A common host is a language service `ConfiguredProject`. * @param scriptSnapshot Text of the file. * @param version Current version of the file. */ - updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; - updateDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; + updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; + updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey; /** * Informs the DocumentRegistry that a file is not needed any longer. @@ -6814,7 +6909,7 @@ declare namespace ts { function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string; function getDefaultCompilerOptions(): CompilerOptions; function getSupportedCodeFixes(): string[]; - function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile; + function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService; /** @@ -6878,9 +6973,15 @@ declare namespace ts { /** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */ const updateComputedPropertyName: (node: ComputedPropertyName, expression: Expression) => ComputedPropertyName; /** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ - const createTypeParameterDeclaration: (name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined) => TypeParameterDeclaration; + const createTypeParameterDeclaration: { + (modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration; + (name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration; + }; /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ - const updateTypeParameterDeclaration: (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined) => TypeParameterDeclaration; + const updateTypeParameterDeclaration: { + (node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; + (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; + }; /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */ const createParameter: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined) => ParameterDeclaration; /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */ @@ -6938,9 +7039,9 @@ declare namespace ts { /** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */ const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => ConstructorTypeNode; /** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */ - const createTypeQueryNode: (exprName: EntityName) => TypeQueryNode; + const createTypeQueryNode: (exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode; /** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */ - const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName) => TypeQueryNode; + const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode; /** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */ const createTypeLiteralNode: (members: readonly TypeElement[] | undefined) => TypeLiteralNode; /** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */ @@ -6978,9 +7079,15 @@ declare namespace ts { /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */ const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode; /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */ - const createImportTypeNode: (argument: TypeNode, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode; + const createImportTypeNode: { + (argument: TypeNode, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; + (argument: TypeNode, assertions?: ImportTypeAssertionContainer | undefined, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; + }; /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */ - const updateImportTypeNode: (node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode; + const updateImportTypeNode: { + (node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; + (node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; + }; /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */ const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode; /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */ |