diff options
Diffstat (limited to 'cli/dts')
-rw-r--r-- | cli/dts/lib.dom.d.ts | 274 | ||||
-rw-r--r-- | cli/dts/lib.dom.iterable.d.ts | 11 | ||||
-rw-r--r-- | cli/dts/lib.es2015.iterable.d.ts | 3 | ||||
-rw-r--r-- | cli/dts/lib.es2020.intl.d.ts | 11 | ||||
-rw-r--r-- | cli/dts/lib.es2021.intl.d.ts | 36 | ||||
-rw-r--r-- | cli/dts/lib.es2022.array.d.ts | 123 | ||||
-rw-r--r-- | cli/dts/lib.es2022.d.ts | 25 | ||||
-rw-r--r-- | cli/dts/lib.es2022.error.d.ts | 75 | ||||
-rw-r--r-- | cli/dts/lib.es2022.full.d.ts (renamed from cli/dts/lib.esnext.string.d.ts) | 12 | ||||
-rw-r--r-- | cli/dts/lib.es2022.object.d.ts | 28 | ||||
-rw-r--r-- | cli/dts/lib.es2022.string.d.ts | 27 | ||||
-rw-r--r-- | cli/dts/lib.es5.d.ts | 6 | ||||
-rw-r--r-- | cli/dts/lib.esnext.array.d.ts | 78 | ||||
-rw-r--r-- | cli/dts/lib.esnext.d.ts | 5 | ||||
-rw-r--r-- | cli/dts/lib.esnext.error.d.ts | 16 | ||||
-rw-r--r-- | cli/dts/lib.esnext.object.d.ts | 12 | ||||
-rw-r--r-- | cli/dts/lib.webworker.d.ts | 143 | ||||
-rw-r--r-- | cli/dts/lib.webworker.iterable.d.ts | 7 | ||||
-rw-r--r-- | cli/dts/typescript.d.ts | 45 |
19 files changed, 704 insertions, 233 deletions
diff --git a/cli/dts/lib.dom.d.ts b/cli/dts/lib.dom.d.ts index d55a04a94..04fa72459 100644 --- a/cli/dts/lib.dom.d.ts +++ b/cli/dts/lib.dom.d.ts @@ -227,7 +227,7 @@ interface ComputedEffectTiming extends EffectTiming { currentIteration?: number | null; endTime?: CSSNumberish; localTime?: CSSNumberish | null; - progress?: CSSNumberish | null; + progress?: number | null; startTime?: CSSNumberish; } @@ -284,8 +284,8 @@ interface CredentialRequestOptions { } interface CryptoKeyPair { - privateKey?: CryptoKey; - publicKey?: CryptoKey; + privateKey: CryptoKey; + publicKey: CryptoKey; } interface CustomEventInit<T = any> extends EventInit { @@ -487,6 +487,18 @@ interface FileSystemFlags { exclusive?: boolean; } +interface FileSystemGetDirectoryOptions { + create?: boolean; +} + +interface FileSystemGetFileOptions { + create?: boolean; +} + +interface FileSystemRemoveOptions { + recursive?: boolean; +} + interface FocusEventInit extends UIEventInit { relatedTarget?: EventTarget | null; } @@ -691,6 +703,24 @@ interface KeyframeEffectOptions extends EffectTiming { pseudoElement?: string | null; } +interface LockInfo { + clientId?: string; + mode?: LockMode; + name?: string; +} + +interface LockManagerSnapshot { + held?: LockInfo[]; + pending?: LockInfo[]; +} + +interface LockOptions { + ifAvailable?: boolean; + mode?: LockMode; + signal?: AbortSignal; + steal?: boolean; +} + interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo { configuration?: MediaDecodingConfiguration; } @@ -940,7 +970,7 @@ interface NotificationOptions { requireInteraction?: boolean; silent?: boolean; tag?: string; - timestamp?: DOMTimeStamp; + timestamp?: EpochTimeStamp; vibrate?: VibratePattern; } @@ -1172,7 +1202,7 @@ interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity { interface PushSubscriptionJSON { endpoint?: string; - expirationTime?: DOMTimeStamp | null; + expirationTime?: EpochTimeStamp | null; keys?: Record<string, string>; } @@ -1199,7 +1229,7 @@ interface RTCAnswerOptions extends RTCOfferAnswerOptions { } interface RTCCertificateExpiration { - expires?: DOMTimeStamp; + expires?: number; } interface RTCConfiguration { @@ -1648,7 +1678,7 @@ interface StreamPipeOptions { } interface StructuredSerializeOptions { - transfer?: any[]; + transfer?: Transferable[]; } interface SubmitEventInit extends EventInit { @@ -1824,42 +1854,42 @@ interface ANGLE_instanced_arrays { } interface ARIAMixin { - ariaAtomic: string; - ariaAutoComplete: string; - ariaBusy: string; - ariaChecked: string; - ariaColCount: string; - ariaColIndex: string; - ariaColSpan: string; - ariaCurrent: string; - ariaDisabled: string; - ariaExpanded: string; - ariaHasPopup: string; - ariaHidden: string; - ariaKeyShortcuts: string; - ariaLabel: string; - ariaLevel: string; - ariaLive: string; - ariaModal: string; - ariaMultiLine: string; - ariaMultiSelectable: string; - ariaOrientation: string; - ariaPlaceholder: string; - ariaPosInSet: string; - ariaPressed: string; - ariaReadOnly: string; - ariaRequired: string; - ariaRoleDescription: string; - ariaRowCount: string; - ariaRowIndex: string; - ariaRowSpan: string; - ariaSelected: string; - ariaSetSize: string; - ariaSort: string; - ariaValueMax: string; - ariaValueMin: string; - ariaValueNow: string; - ariaValueText: string; + ariaAtomic: string | null; + ariaAutoComplete: string | null; + ariaBusy: string | null; + ariaChecked: string | null; + ariaColCount: string | null; + ariaColIndex: string | null; + ariaColSpan: string | null; + ariaCurrent: string | null; + ariaDisabled: string | null; + ariaExpanded: string | null; + ariaHasPopup: string | null; + ariaHidden: string | null; + ariaKeyShortcuts: string | null; + ariaLabel: string | null; + ariaLevel: string | null; + ariaLive: string | null; + ariaModal: string | null; + ariaMultiLine: string | null; + ariaMultiSelectable: string | null; + ariaOrientation: string | null; + ariaPlaceholder: string | null; + ariaPosInSet: string | null; + ariaPressed: string | null; + ariaReadOnly: string | null; + ariaRequired: string | null; + ariaRoleDescription: string | null; + ariaRowCount: string | null; + ariaRowIndex: string | null; + ariaRowSpan: string | null; + ariaSelected: string | null; + ariaSetSize: string | null; + ariaSort: string | null; + ariaValueMax: string | null; + ariaValueMin: string | null; + ariaValueNow: string | null; + ariaValueText: string | null; } /** A controller object that allows you to abort one or more DOM requests as and when desired. */ @@ -1867,7 +1897,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(): void; + abort(reason?: any): void; } declare var AbortController: { @@ -2954,6 +2984,7 @@ interface CSSStyleDeclaration { scrollSnapAlign: string; scrollSnapStop: string; scrollSnapType: string; + scrollbarGutter: string; shapeImageThreshold: string; shapeMargin: string; shapeOutside: string; @@ -3251,9 +3282,23 @@ declare var CacheStorage: { new(): CacheStorage; }; +interface CanvasCaptureMediaStreamTrack extends MediaStreamTrack { + readonly canvas: HTMLCanvasElement; + requestFrame(): void; + addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: CanvasCaptureMediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: CanvasCaptureMediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var CanvasCaptureMediaStreamTrack: { + prototype: CanvasCaptureMediaStreamTrack; + new(): CanvasCaptureMediaStreamTrack; +}; + interface CanvasCompositing { globalAlpha: number; - globalCompositeOperation: string; + globalCompositeOperation: GlobalCompositeOperation; } interface CanvasDrawImage { @@ -3279,6 +3324,7 @@ interface CanvasDrawPath { interface CanvasFillStrokeStyles { fillStyle: string | CanvasGradient | CanvasPattern; strokeStyle: string | CanvasGradient | CanvasPattern; + createConicGradient(startAngle: number, x: number, y: number): CanvasGradient; createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null; createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; @@ -3602,6 +3648,8 @@ interface Crypto { /** Available only in secure contexts. */ readonly subtle: SubtleCrypto; getRandomValues<T extends ArrayBufferView | null>(array: T): T; + /** Available only in secure contexts. */ + randomUUID(): string; } declare var Crypto: { @@ -4308,7 +4356,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad readonly timeline: DocumentTimeline; /** Contains the title of the document. */ title: string; - readonly visibilityState: VisibilityState; + readonly visibilityState: DocumentVisibilityState; /** * Sets or gets the color of the links that the user has visited. * @deprecated @@ -4948,8 +4996,10 @@ interface EventSource extends EventTarget { readonly CONNECTING: number; readonly OPEN: number; addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } @@ -5091,6 +5141,20 @@ declare var FileSystemDirectoryEntry: { new(): FileSystemDirectoryEntry; }; +/** Available only in secure contexts. */ +interface FileSystemDirectoryHandle extends FileSystemHandle { + readonly kind: "directory"; + getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>; + getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>; + removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>; + resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>; +} + +declare var FileSystemDirectoryHandle: { + prototype: FileSystemDirectoryHandle; + new(): FileSystemDirectoryHandle; +}; + interface FileSystemDirectoryReader { readEntries(successCallback: FileSystemEntriesCallback, errorCallback?: ErrorCallback): void; } @@ -5123,6 +5187,29 @@ declare var FileSystemFileEntry: { new(): FileSystemFileEntry; }; +/** Available only in secure contexts. */ +interface FileSystemFileHandle extends FileSystemHandle { + readonly kind: "file"; + getFile(): Promise<File>; +} + +declare var FileSystemFileHandle: { + prototype: FileSystemFileHandle; + new(): FileSystemFileHandle; +}; + +/** Available only in secure contexts. */ +interface FileSystemHandle { + readonly kind: FileSystemHandleKind; + readonly name: string; + isSameEntry(other: FileSystemHandle): Promise<boolean>; +} + +declare var FileSystemHandle: { + prototype: FileSystemHandle; + new(): FileSystemHandle; +}; + /** Focus-related events like focus, blur, focusin, or focusout. */ interface FocusEvent extends UIEvent { readonly relatedTarget: EventTarget | null; @@ -5325,7 +5412,7 @@ declare var GeolocationCoordinates: { /** Available only in secure contexts. */ interface GeolocationPosition { readonly coords: GeolocationCoordinates; - readonly timestamp: DOMTimeStamp; + readonly timestamp: EpochTimeStamp; } declare var GeolocationPosition: { @@ -5424,6 +5511,7 @@ interface GlobalEventHandlersEventMap { "select": Event; "selectionchange": Event; "selectstart": Event; + "slotchange": Event; "stalled": Event; "submit": SubmitEvent; "suspend": Event; @@ -5658,6 +5746,7 @@ interface GlobalEventHandlers { * @param ev The event. */ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null; /** * Occurs when the seek operation ends. * @param ev The event. @@ -5675,6 +5764,7 @@ interface GlobalEventHandlers { onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null; onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Occurs when the download has stopped. * @param ev The event. @@ -6640,7 +6730,8 @@ interface HTMLImageElement extends HTMLElement { hspace: number; /** Sets or retrieves whether the image is a server-side image map. */ isMap: boolean; - loading: string; + /** Sets or retrieves the policy for loading image elements that are outside the viewport. */ + loading: "eager" | "lazy"; /** * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object. * @deprecated @@ -7098,6 +7189,7 @@ interface HTMLMetaElement extends HTMLElement { content: string; /** Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header. */ httpEquiv: string; + media: string; /** Sets or retrieves the value specified in the content attribute of the meta object. */ name: string; /** @@ -7617,6 +7709,7 @@ declare var HTMLSlotElement: { /** Provides special properties (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating <source> elements. */ interface HTMLSourceElement extends HTMLElement { + height: number; /** Gets or sets the intended media type of the media source. */ media: string; sizes: string; @@ -7625,6 +7718,7 @@ interface HTMLSourceElement extends HTMLElement { srcset: string; /** Gets or sets the MIME type of a media resource. */ type: string; + width: number; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSourceElement, 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: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -8580,6 +8674,7 @@ interface IDBTransactionEventMap { interface IDBTransaction extends EventTarget { /** Returns the transaction's connection. */ readonly db: IDBDatabase; + readonly durability: IDBTransactionDurability; /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */ readonly error: DOMException | null; /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */ @@ -8682,6 +8777,14 @@ interface InnerHTML { innerHTML: string; } +interface InputDeviceInfo extends MediaDeviceInfo { +} + +declare var InputDeviceInfo: { + prototype: InputDeviceInfo; + new(): InputDeviceInfo; +}; + interface InputEvent extends UIEvent { readonly data: string | null; readonly dataTransfer: DataTransfer | null; @@ -8851,6 +8954,29 @@ declare var Location: { new(): Location; }; +/** Available only in secure contexts. */ +interface Lock { + readonly mode: LockMode; + readonly name: string; +} + +declare var Lock: { + prototype: Lock; + new(): Lock; +}; + +/** Available only in secure contexts. */ +interface LockManager { + query(): Promise<LockManagerSnapshot>; + request(name: string, callback: LockGrantedCallback): Promise<any>; + request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>; +} + +declare var LockManager: { + prototype: LockManager; + new(): LockManager; +}; + interface MathMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap { } @@ -10177,6 +10303,7 @@ interface PerformanceEventTiming extends PerformanceEntry { readonly processingEnd: DOMHighResTimeStamp; readonly processingStart: DOMHighResTimeStamp; readonly target: Node | null; + toJSON(): any; } declare var PerformanceEventTiming: { @@ -10583,7 +10710,7 @@ declare var PublicKeyCredential: { */ interface PushManager { getSubscription(): Promise<PushSubscription | null>; - permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>; + permissionState(options?: PushSubscriptionOptionsInit): Promise<PermissionState>; subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>; } @@ -10621,7 +10748,7 @@ declare var PushSubscriptionOptions: { }; interface RTCCertificate { - readonly expires: DOMTimeStamp; + readonly expires: EpochTimeStamp; getFingerprints(): RTCDtlsFingerprint[]; } @@ -10899,6 +11026,7 @@ interface RTCRtpTransceiver { readonly mid: string | null; readonly receiver: RTCRtpReceiver; readonly sender: RTCRtpSender; + setCodecPreferences(codecs: RTCRtpCodecCapability[]): void; stop(): void; } @@ -11113,6 +11241,7 @@ interface ResizeObserverEntry { readonly borderBoxSize: ReadonlyArray<ResizeObserverSize>; readonly contentBoxSize: ReadonlyArray<ResizeObserverSize>; readonly contentRect: DOMRectReadOnly; + readonly devicePixelContentBoxSize: ReadonlyArray<ResizeObserverSize>; readonly target: Element; } @@ -13073,11 +13202,21 @@ declare var ServiceWorkerRegistration: { new(): ServiceWorkerRegistration; }; +interface ShadowRootEventMap { + "slotchange": Event; +} + interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot, InnerHTML { readonly delegatesFocus: boolean; readonly host: Element; readonly mode: ShadowRootMode; + onslotchange: ((this: ShadowRoot, ev: Event) => any) | null; + readonly slotAssignment: SlotAssignmentMode; /** Throws a "NotSupportedError" DOMException if context object is a shadow root. */ + addEventListener<K extends keyof ShadowRootEventMap>(type: K, listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener<K extends keyof ShadowRootEventMap>(type: K, listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var ShadowRoot: { @@ -13370,6 +13509,7 @@ declare var StorageEvent: { /** Available only in secure contexts. */ interface StorageManager { estimate(): Promise<StorageEstimate>; + getDirectory(): Promise<FileSystemDirectoryHandle>; persist(): Promise<boolean>; persisted(): Promise<boolean>; } @@ -14131,6 +14271,13 @@ interface WEBGL_lose_context { restoreContext(): void; } +interface WEBGL_multi_draw { + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void; +} + /** A WaveShaperNode always has exactly one input and one output. */ interface WaveShaperNode extends AudioNode { curve: Float32Array | null; @@ -16296,12 +16443,13 @@ interface WindowOrWorkerGlobalScope { readonly performance: Performance; atob(data: string): string; btoa(data: string): string; - clearInterval(handle?: number): void; - clearTimeout(handle?: number): void; + clearInterval(id?: number): void; + 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>; queueMicrotask(callback: VoidFunction): void; + reportError(e: any): void; setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; } @@ -16790,7 +16938,7 @@ declare namespace WebAssembly { type ImportExportKind = "function" | "global" | "memory" | "table"; type TableKind = "anyfunc" | "externref"; - type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64"; + type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128"; type ExportValue = Function | Global | Memory | Table; type Exports = Record<string, ExportValue>; type ImportValue = ExportValue | number; @@ -16852,6 +17000,10 @@ interface IntersectionObserverCallback { (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void; } +interface LockGrantedCallback { + (lock: Lock | null): any; +} + interface MediaSessionActionHandler { (details: MediaSessionActionDetails): void; } @@ -17480,6 +17632,7 @@ declare var onresize: ((this: Window, ev: UIEvent) => any) | null; * @param ev The event. */ declare var onscroll: ((this: Window, ev: Event) => any) | null; +declare var onsecuritypolicyviolation: ((this: Window, ev: SecurityPolicyViolationEvent) => any) | null; /** * Occurs when the seek operation ends. * @param ev The event. @@ -17497,6 +17650,7 @@ declare var onseeking: ((this: Window, ev: Event) => any) | null; declare var onselect: ((this: Window, ev: Event) => any) | null; declare var onselectionchange: ((this: Window, ev: Event) => any) | null; declare var onselectstart: ((this: Window, ev: Event) => any) | null; +declare var onslotchange: ((this: Window, ev: Event) => any) | null; /** * Occurs when the download has stopped. * @param ev The event. @@ -17570,12 +17724,13 @@ declare var origin: string; declare var performance: Performance; declare function atob(data: string): string; declare function btoa(data: string): string; -declare function clearInterval(handle?: number): void; -declare function clearTimeout(handle?: number): void; +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 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 var sessionStorage: Storage; @@ -17600,7 +17755,7 @@ type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters; type ConstrainDouble = number | ConstrainDoubleRange; type ConstrainULong = number | ConstrainULongRange; type DOMHighResTimeStamp = number; -type DOMTimeStamp = number; +type EpochTimeStamp = number; type EventListenerOrEventListenerObject = EventListener | EventListenerObject; type Float32List = Float32Array | GLfloat[]; type FormDataEntryValue = File | string; @@ -17684,17 +17839,21 @@ type DirectionSetting = "" | "lr" | "rl"; type DisplayCaptureSurfaceType = "application" | "browser" | "monitor" | "window"; type DistanceModelType = "exponential" | "inverse" | "linear"; type DocumentReadyState = "complete" | "interactive" | "loading"; +type DocumentVisibilityState = "hidden" | "visible"; type EndOfStreamError = "decode" | "network"; type EndingType = "native" | "transparent"; +type FileSystemHandleKind = "directory" | "file"; type FillMode = "auto" | "backwards" | "both" | "forwards" | "none"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; type GamepadHapticActuatorType = "vibration"; type GamepadMappingType = "" | "standard" | "xr-standard"; +type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "done" | "pending"; +type IDBTransactionDurability = "default" | "relaxed" | "strict"; type IDBTransactionMode = "readonly" | "readwrite" | "versionchange"; type ImageOrientation = "flipY" | "none"; type ImageSmoothingQuality = "high" | "low" | "medium"; @@ -17703,6 +17862,7 @@ type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki"; 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 MediaDecodingType = "file" | "media-source" | "webrtc"; type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput"; type MediaEncodingType = "record" | "webrtc"; @@ -17732,7 +17892,6 @@ type PremultiplyAlpha = "default" | "none" | "premultiply"; type PresentationStyle = "attachment" | "inline" | "unspecified"; type PublicKeyCredentialType = "public-key"; type PushEncryptionKeyName = "auth" | "p256dh"; -type PushPermissionState = "denied" | "granted" | "prompt"; type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat"; type RTCDataChannelState = "closed" | "closing" | "connecting" | "open"; type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution"; @@ -17785,7 +17944,6 @@ type TouchType = "direct" | "stylus"; type TransferFunction = "hlg" | "pq" | "srgb"; type UserVerificationRequirement = "discouraged" | "preferred" | "required"; type VideoFacingModeEnum = "environment" | "left" | "right" | "user"; -type VisibilityState = "hidden" | "visible"; 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.iterable.d.ts b/cli/dts/lib.dom.iterable.d.ts index 761616e2d..667eaad63 100644 --- a/cli/dts/lib.dom.iterable.d.ts +++ b/cli/dts/lib.dom.iterable.d.ts @@ -188,6 +188,10 @@ interface PluginArray { [Symbol.iterator](): IterableIterator<Plugin>; } +interface RTCRtpTransceiver { + setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void; +} + interface RTCStatsReport extends ReadonlyMap<string, any> { } @@ -263,6 +267,13 @@ interface WEBGL_draw_buffers { drawBuffersWEBGL(buffers: Iterable<GLenum>): void; } +interface WEBGL_multi_draw { + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void; +} + interface WebGL2RenderingContextBase { clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void; clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void; diff --git a/cli/dts/lib.es2015.iterable.d.ts b/cli/dts/lib.es2015.iterable.d.ts index d6907b894..8a7292383 100644 --- a/cli/dts/lib.es2015.iterable.d.ts +++ b/cli/dts/lib.es2015.iterable.d.ts @@ -157,7 +157,8 @@ interface ReadonlyMap<K, V> { } interface MapConstructor { - new <K, V>(iterable: Iterable<readonly [K, V]>): Map<K, V>; + new(): Map<any, any>; + new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>; } interface WeakMap<K extends object, V> { } diff --git a/cli/dts/lib.es2020.intl.d.ts b/cli/dts/lib.es2020.intl.d.ts index 47fe33ffd..3e47f89cf 100644 --- a/cli/dts/lib.es2020.intl.d.ts +++ b/cli/dts/lib.es2020.intl.d.ts @@ -220,17 +220,21 @@ declare namespace Intl { interface NumberFormatOptions { compactDisplay?: "short" | "long" | undefined; notation?: "standard" | "scientific" | "engineering" | "compact" | undefined; - signDisplay?: "auto" | "never" | "always" | undefined; + signDisplay?: "auto" | "never" | "always" | "exceptZero" | undefined; unit?: string | undefined; unitDisplay?: "short" | "long" | "narrow" | undefined; + currencyDisplay?: string | undefined; + currencySign?: string | undefined; } interface ResolvedNumberFormatOptions { compactDisplay?: "short" | "long"; notation?: "standard" | "scientific" | "engineering" | "compact"; - signDisplay?: "auto" | "never" | "always"; + signDisplay?: "auto" | "never" | "always" | "exceptZero"; unit?: string; unitDisplay?: "short" | "long" | "narrow"; + currencyDisplay?: string; + currencySign?: string; } interface DateTimeFormatOptions { @@ -297,6 +301,7 @@ declare namespace Intl { }; interface DisplayNamesOptions { + locale: UnicodeBCP47LocaleIdentifier; localeMatcher: RelativeTimeFormatLocaleMatcher; style: RelativeTimeFormatStyle; type: "language" | "region" | "script" | "currency"; @@ -319,7 +324,7 @@ declare namespace Intl { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). */ - of(code: string): string; + of(code: string): string | undefined; /** * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current * [`Intl/DisplayNames`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. diff --git a/cli/dts/lib.es2021.intl.d.ts b/cli/dts/lib.es2021.intl.d.ts index a3f6ec943..6380bf6fb 100644 --- a/cli/dts/lib.es2021.intl.d.ts +++ b/cli/dts/lib.es2021.intl.d.ts @@ -49,25 +49,25 @@ declare namespace Intl { */ type ListFormatLocaleMatcher = "lookup" | "best fit"; - /** - * The format of output message. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ + /** + * The format of output message. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ type ListFormatType = "conjunction" | "disjunction" | "unit"; - - /** - * The length of the formatted message. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ + + /** + * The length of the formatted message. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ type ListFormatStyle = "long" | "short" | "narrow"; - - /** - * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. - * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). - */ + + /** + * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. + * + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + */ 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; @@ -76,7 +76,7 @@ declare namespace Intl { /** The length of the internationalized message. */ style?: ListFormatStyle; } - + interface ListFormat { /** * Returns a string with a language-specific representation of the list. diff --git a/cli/dts/lib.es2022.array.d.ts b/cli/dts/lib.es2022.array.d.ts new file mode 100644 index 000000000..1c117c530 --- /dev/null +++ b/cli/dts/lib.es2022.array.d.ts @@ -0,0 +1,123 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + + +/// <reference no-default-lib="true"/> + + +interface Array<T> { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; +} + +interface ReadonlyArray<T> { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): T | undefined; +} + +interface Int8Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Uint8Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Uint8ClampedArray { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Int16Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Uint16Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Int32Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Uint32Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Float32Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface Float64Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; +} + +interface BigInt64Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; +} + +interface BigUint64Array { + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): bigint | undefined; +} diff --git a/cli/dts/lib.es2022.d.ts b/cli/dts/lib.es2022.d.ts new file mode 100644 index 000000000..73558c811 --- /dev/null +++ b/cli/dts/lib.es2022.d.ts @@ -0,0 +1,25 @@ +/*! ***************************************************************************** +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="es2021" /> +/// <reference lib="es2022.array" /> +/// <reference lib="es2022.error" /> +/// <reference lib="es2022.object" /> +/// <reference lib="es2022.string" /> diff --git a/cli/dts/lib.es2022.error.d.ts b/cli/dts/lib.es2022.error.d.ts new file mode 100644 index 000000000..d97525dcc --- /dev/null +++ b/cli/dts/lib.es2022.error.d.ts @@ -0,0 +1,75 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + + +/// <reference no-default-lib="true"/> + + +interface ErrorOptions { + cause?: Error; +} + +interface Error { + cause?: Error; +} + +interface ErrorConstructor { + new (message?: string, options?: ErrorOptions): Error; + (message?: string, options?: ErrorOptions): Error; +} + +interface EvalErrorConstructor { + new (message?: string, options?: ErrorOptions): EvalError; + (message?: string, options?: ErrorOptions): EvalError; +} + +interface RangeErrorConstructor { + new (message?: string, options?: ErrorOptions): RangeError; + (message?: string, options?: ErrorOptions): RangeError; +} + +interface ReferenceErrorConstructor { + new (message?: string, options?: ErrorOptions): ReferenceError; + (message?: string, options?: ErrorOptions): ReferenceError; +} + +interface SyntaxErrorConstructor { + new (message?: string, options?: ErrorOptions): SyntaxError; + (message?: string, options?: ErrorOptions): SyntaxError; +} + +interface TypeErrorConstructor { + new (message?: string, options?: ErrorOptions): TypeError; + (message?: string, options?: ErrorOptions): TypeError; +} + +interface URIErrorConstructor { + new (message?: string, options?: ErrorOptions): URIError; + (message?: string, options?: ErrorOptions): URIError; +} + +interface AggregateErrorConstructor { + new ( + errors: Iterable<any>, + message?: string, + options?: ErrorOptions + ): AggregateError; + ( + errors: Iterable<any>, + message?: string, + options?: ErrorOptions + ): AggregateError; +} diff --git a/cli/dts/lib.esnext.string.d.ts b/cli/dts/lib.es2022.full.d.ts index 6178491bd..19e78d48d 100644 --- a/cli/dts/lib.esnext.string.d.ts +++ b/cli/dts/lib.es2022.full.d.ts @@ -18,10 +18,8 @@ and limitations under the License. /// <reference no-default-lib="true"/> -interface String { - /** - * Access string by relative indexing. - * @param index index to access. - */ - at(index: number): string | undefined; -} +/// <reference lib="es2022" /> +/// <reference lib="dom" /> +/// <reference lib="webworker.importscripts" /> +/// <reference lib="scripthost" /> +/// <reference lib="dom.iterable" /> diff --git a/cli/dts/lib.es2022.object.d.ts b/cli/dts/lib.es2022.object.d.ts new file mode 100644 index 000000000..634601006 --- /dev/null +++ b/cli/dts/lib.es2022.object.d.ts @@ -0,0 +1,28 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + + +/// <reference no-default-lib="true"/> + + +interface Object { + /** + * Determines whether an object has a property with the specified name. + * @param o An object. + * @param v A property name. + */ + hasOwn(o: object, v: PropertyKey): boolean; +} diff --git a/cli/dts/lib.es2022.string.d.ts b/cli/dts/lib.es2022.string.d.ts new file mode 100644 index 000000000..fbfc17f16 --- /dev/null +++ b/cli/dts/lib.es2022.string.d.ts @@ -0,0 +1,27 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + + +/// <reference no-default-lib="true"/> + + +interface String { + /** + * Returns a new String consisting of the single UTF-16 code unit located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): string | undefined; +} diff --git a/cli/dts/lib.es5.d.ts b/cli/dts/lib.es5.d.ts index 1f8508ab4..9f27ff527 100644 --- a/cli/dts/lib.es5.d.ts +++ b/cli/dts/lib.es5.d.ts @@ -116,7 +116,7 @@ interface PropertyDescriptor { } interface PropertyDescriptorMap { - [s: string]: PropertyDescriptor; + [key: PropertyKey]: PropertyDescriptor; } interface Object { @@ -1515,7 +1515,7 @@ interface Promise<T> { type Awaited<T> = T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped - F extends ((value: infer V) => any) ? // if the argument to `then` is callable, extracts the argument + F extends ((value: infer V, ...args: any) => any) ? // if the argument to `then` is callable, extracts the first argument Awaited<V> : // recursively unwrap the value never : // the argument to `then` was not callable T; // non-object or non-thenable @@ -4375,7 +4375,6 @@ declare namespace Intl { localeMatcher?: string | undefined; style?: string | undefined; currency?: string | undefined; - currencyDisplay?: string | undefined; currencySign?: string | undefined; useGrouping?: boolean | undefined; minimumIntegerDigits?: number | undefined; @@ -4390,7 +4389,6 @@ declare namespace Intl { numberingSystem: string; style: string; currency?: string; - currencyDisplay?: string; minimumIntegerDigits: number; minimumFractionDigits: number; maximumFractionDigits: number; diff --git a/cli/dts/lib.esnext.array.d.ts b/cli/dts/lib.esnext.array.d.ts index d68fa5188..76defb57e 100644 --- a/cli/dts/lib.esnext.array.d.ts +++ b/cli/dts/lib.esnext.array.d.ts @@ -17,12 +17,6 @@ and limitations under the License. interface Array<T> { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): T | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -48,12 +42,6 @@ interface Array<T> { interface ReadonlyArray<T> { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): T | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -79,12 +67,6 @@ interface ReadonlyArray<T> { interface Int8Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): number | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -109,12 +91,6 @@ interface Int8Array { interface Uint8Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): number | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -139,12 +115,6 @@ interface Uint8Array { interface Uint8ClampedArray { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): number | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -170,12 +140,6 @@ interface Uint8ClampedArray { interface Int16Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): number | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -200,12 +164,6 @@ interface Int16Array { interface Uint16Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): number | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -230,12 +188,6 @@ interface Uint16Array { interface Int32Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): number | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -260,12 +212,6 @@ interface Int32Array { interface Uint32Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): number | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -290,12 +236,6 @@ interface Uint32Array { interface Float32Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): number | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -320,12 +260,6 @@ interface Float32Array { interface Float64Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): number | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -350,12 +284,6 @@ interface Float64Array { interface BigInt64Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): bigint | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending @@ -380,12 +308,6 @@ interface BigInt64Array { interface BigUint64Array { /** - * Access item by relative indexing. - * @param index index to access. - */ - at(index: number): bigint | undefined; - - /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending diff --git a/cli/dts/lib.esnext.d.ts b/cli/dts/lib.esnext.d.ts index 0e23bff0f..9605d2f9e 100644 --- a/cli/dts/lib.esnext.d.ts +++ b/cli/dts/lib.esnext.d.ts @@ -18,9 +18,6 @@ and limitations under the License. /// <reference no-default-lib="true"/> -/// <reference lib="es2021" /> +/// <reference lib="es2022" /> /// <reference lib="esnext.array" /> -/// <reference lib="esnext.error" /> /// <reference lib="esnext.intl" /> -/// <reference lib="esnext.object" /> -/// <reference lib="esnext.string" /> diff --git a/cli/dts/lib.esnext.error.d.ts b/cli/dts/lib.esnext.error.d.ts deleted file mode 100644 index 90f2fcb09..000000000 --- a/cli/dts/lib.esnext.error.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. - -/// <reference no-default-lib="true"/> - -interface Error { - cause?: any; -} - -interface ErrorInit { - cause?: any; -} - -interface ErrorConstructor { - new (message?: string, init?: ErrorInit): Error; - (message?: string, init?: ErrorInit): Error; -} diff --git a/cli/dts/lib.esnext.object.d.ts b/cli/dts/lib.esnext.object.d.ts deleted file mode 100644 index ed9d0ee30..000000000 --- a/cli/dts/lib.esnext.object.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. - -/// <reference no-default-lib="true"/> - -interface ObjectConstructor { - /** - * Determines whether an object has a property with the specified name. - * @param o The target object. - * @param v A property name. - */ - hasOwn(o: object, v: PropertyKey): boolean; -} diff --git a/cli/dts/lib.webworker.d.ts b/cli/dts/lib.webworker.d.ts index 242db956a..f6b3d43b3 100644 --- a/cli/dts/lib.webworker.d.ts +++ b/cli/dts/lib.webworker.d.ts @@ -90,8 +90,8 @@ interface CloseEventInit extends EventInit { } interface CryptoKeyPair { - privateKey?: CryptoKey; - publicKey?: CryptoKey; + privateKey: CryptoKey; + publicKey: CryptoKey; } interface CustomEventInit<T = any> extends EventInit { @@ -210,6 +210,18 @@ interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } +interface FileSystemGetDirectoryOptions { + create?: boolean; +} + +interface FileSystemGetFileOptions { + create?: boolean; +} + +interface FileSystemRemoveOptions { + recursive?: boolean; +} + interface FontFaceDescriptors { display?: string; featureSettings?: string; @@ -310,6 +322,24 @@ interface KeyAlgorithm { name: string; } +interface LockInfo { + clientId?: string; + mode?: LockMode; + name?: string; +} + +interface LockManagerSnapshot { + held?: LockInfo[]; + pending?: LockInfo[]; +} + +interface LockOptions { + ifAvailable?: boolean; + mode?: LockMode; + signal?: AbortSignal; + steal?: boolean; +} + interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo { configuration?: MediaDecodingConfiguration; } @@ -373,7 +403,7 @@ interface NotificationOptions { requireInteraction?: boolean; silent?: boolean; tag?: string; - timestamp?: DOMTimeStamp; + timestamp?: EpochTimeStamp; vibrate?: VibratePattern; } @@ -422,7 +452,7 @@ interface PushEventInit extends ExtendableEventInit { interface PushSubscriptionJSON { endpoint?: string; - expirationTime?: DOMTimeStamp | null; + expirationTime?: EpochTimeStamp | null; keys?: Record<string, string>; } @@ -578,7 +608,7 @@ interface StreamPipeOptions { } interface StructuredSerializeOptions { - transfer?: any[]; + transfer?: Transferable[]; } interface TextDecodeOptions { @@ -665,7 +695,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(): void; + abort(reason?: any): void; } declare var AbortController: { @@ -905,6 +935,8 @@ interface Crypto { /** Available only in secure contexts. */ readonly subtle: SubtleCrypto; getRandomValues<T extends ArrayBufferView | null>(array: T): T; + /** Available only in secure contexts. */ + randomUUID(): string; } declare var Crypto: { @@ -1358,8 +1390,10 @@ interface EventSource extends EventTarget { readonly CONNECTING: number; readonly OPEN: number; addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } @@ -1518,6 +1552,43 @@ declare var FileReaderSync: { new(): FileReaderSync; }; +/** Available only in secure contexts. */ +interface FileSystemDirectoryHandle extends FileSystemHandle { + readonly kind: "directory"; + getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>; + getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>; + removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>; + resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>; +} + +declare var FileSystemDirectoryHandle: { + prototype: FileSystemDirectoryHandle; + new(): FileSystemDirectoryHandle; +}; + +/** Available only in secure contexts. */ +interface FileSystemFileHandle extends FileSystemHandle { + readonly kind: "file"; + getFile(): Promise<File>; +} + +declare var FileSystemFileHandle: { + prototype: FileSystemFileHandle; + new(): FileSystemFileHandle; +}; + +/** Available only in secure contexts. */ +interface FileSystemHandle { + readonly kind: FileSystemHandleKind; + readonly name: string; + isSameEntry(other: FileSystemHandle): Promise<boolean>; +} + +declare var FileSystemHandle: { + prototype: FileSystemHandle; + new(): FileSystemHandle; +}; + interface FontFace { ascentOverride: string; descentOverride: string; @@ -1981,6 +2052,7 @@ interface IDBTransactionEventMap { interface IDBTransaction extends EventTarget { /** Returns the transaction's connection. */ readonly db: IDBDatabase; + readonly durability: IDBTransactionDurability; /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */ readonly error: DOMException | null; /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */ @@ -2061,6 +2133,29 @@ interface KHR_parallel_shader_compile { readonly COMPLETION_STATUS_KHR: GLenum; } +/** Available only in secure contexts. */ +interface Lock { + readonly mode: LockMode; + readonly name: string; +} + +declare var Lock: { + prototype: Lock; + new(): Lock; +}; + +/** Available only in secure contexts. */ +interface LockManager { + query(): Promise<LockManagerSnapshot>; + request(name: string, callback: LockGrantedCallback): Promise<any>; + request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>; +} + +declare var LockManager: { + prototype: LockManager; + new(): LockManager; +}; + interface MediaCapabilities { decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>; encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>; @@ -2481,7 +2576,7 @@ declare var PushEvent: { */ interface PushManager { getSubscription(): Promise<PushSubscription | null>; - permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>; + permissionState(options?: PushSubscriptionOptionsInit): Promise<PermissionState>; subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>; } @@ -2798,6 +2893,7 @@ declare var SharedWorkerGlobalScope: { /** Available only in secure contexts. */ interface StorageManager { estimate(): Promise<StorageEstimate>; + getDirectory(): Promise<FileSystemDirectoryHandle>; persisted(): Promise<boolean>; } @@ -3134,6 +3230,13 @@ interface WEBGL_lose_context { restoreContext(): void; } +interface WEBGL_multi_draw { + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void; +} + interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase { } @@ -5075,7 +5178,7 @@ declare var WebSocket: { /** This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. */ interface WindowClient extends Client { readonly focused: boolean; - readonly visibilityState: VisibilityState; + readonly visibilityState: DocumentVisibilityState; focus(): Promise<WindowClient>; navigate(url: string | URL): Promise<WindowClient | null>; } @@ -5096,12 +5199,13 @@ interface WindowOrWorkerGlobalScope { readonly performance: Performance; atob(data: string): string; btoa(data: string): string; - clearInterval(handle?: number): void; - clearTimeout(handle?: number): void; + clearInterval(id?: number): void; + 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>; queueMicrotask(callback: VoidFunction): void; + reportError(e: any): void; setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; } @@ -5518,7 +5622,7 @@ declare namespace WebAssembly { type ImportExportKind = "function" | "global" | "memory" | "table"; type TableKind = "anyfunc" | "externref"; - type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64"; + type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128"; type ExportValue = Function | Global | Memory | Table; type Exports = Record<string, ExportValue>; type ImportValue = ExportValue | number; @@ -5536,6 +5640,10 @@ interface FrameRequestCallback { (time: DOMHighResTimeStamp): void; } +interface LockGrantedCallback { + (lock: Lock | null): any; +} + interface OnErrorEventHandlerNonNull { (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any; } @@ -5630,12 +5738,13 @@ declare var origin: string; declare var performance: Performance; declare function atob(data: string): string; declare function btoa(data: string): string; -declare function clearInterval(handle?: number): void; -declare function clearTimeout(handle?: number): void; +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 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 cancelAnimationFrame(handle: number): void; @@ -5652,7 +5761,7 @@ type BodyInit = ReadableStream | XMLHttpRequestBodyInit; type BufferSource = ArrayBufferView | ArrayBuffer; type CanvasImageSource = ImageBitmap | OffscreenCanvas; type DOMHighResTimeStamp = number; -type DOMTimeStamp = number; +type EpochTimeStamp = number; type EventListenerOrEventListenerObject = EventListener | EventListenerObject; type Float32List = Float32Array | GLfloat[]; type FormDataEntryValue = File | string; @@ -5693,18 +5802,22 @@ type ClientTypes = "all" | "sharedworker" | "window" | "worker"; type ColorGamut = "p3" | "rec2020" | "srgb"; type ColorSpaceConversion = "default" | "none"; type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi"; +type DocumentVisibilityState = "hidden" | "visible"; type EndingType = "native" | "transparent"; +type FileSystemHandleKind = "directory" | "file"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "done" | "pending"; +type IDBTransactionDurability = "default" | "relaxed" | "strict"; type IDBTransactionMode = "readonly" | "readwrite" | "versionchange"; type ImageOrientation = "flipY" | "none"; type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki"; type KeyType = "private" | "public" | "secret"; type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey"; +type LockMode = "exclusive" | "shared"; type MediaDecodingType = "file" | "media-source" | "webrtc"; type MediaEncodingType = "record" | "webrtc"; type NotificationDirection = "auto" | "ltr" | "rtl"; @@ -5714,7 +5827,6 @@ type PermissionState = "denied" | "granted" | "prompt"; type PredefinedColorSpace = "display-p3" | "srgb"; type PremultiplyAlpha = "default" | "none" | "premultiply"; type PushEncryptionKeyName = "auth" | "p256dh"; -type PushPermissionState = "denied" | "granted" | "prompt"; 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"; @@ -5727,7 +5839,6 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; type TransferFunction = "hlg" | "pq" | "srgb"; -type VisibilityState = "hidden" | "visible"; 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 3d67660b7..9f39fc026 100644 --- a/cli/dts/lib.webworker.iterable.d.ts +++ b/cli/dts/lib.webworker.iterable.d.ts @@ -100,6 +100,13 @@ interface WEBGL_draw_buffers { drawBuffersWEBGL(buffers: Iterable<GLenum>): void; } +interface WEBGL_multi_draw { + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void; +} + interface WebGL2RenderingContextBase { clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void; clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void; diff --git a/cli/dts/typescript.d.ts b/cli/dts/typescript.d.ts index 1885ae339..0c1763205 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.5"; + const versionMajorMinor = "4.6"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -572,7 +572,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 | 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 | 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; @@ -897,7 +897,7 @@ declare namespace ts { export interface TypePredicateNode extends TypeNode { readonly kind: SyntaxKind.TypePredicate; readonly parent: SignatureDeclaration | JSDocTypeExpression; - readonly assertsModifier?: AssertsToken; + readonly assertsModifier?: AssertsKeyword; readonly parameterName: Identifier | ThisTypeNode; readonly type?: TypeNode; } @@ -968,7 +968,7 @@ declare namespace ts { } export interface MappedTypeNode extends TypeNode, Declaration { readonly kind: SyntaxKind.MappedType; - readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken; + readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken; readonly typeParameter: TypeParameterDeclaration; readonly nameType?: TypeNode; readonly questionToken?: QuestionToken | PlusToken | MinusToken; @@ -1465,7 +1465,7 @@ declare namespace ts { } export interface ForOfStatement extends IterationStatement { readonly kind: SyntaxKind.ForOfStatement; - readonly awaitModifier?: AwaitKeywordToken; + readonly awaitModifier?: AwaitKeyword; readonly initializer: ForInitializer; readonly expression: Expression; } @@ -1652,7 +1652,7 @@ declare namespace ts { readonly kind: SyntaxKind.AssertEntry; readonly parent: AssertClause; readonly name: AssertionKey; - readonly value: StringLiteral; + readonly value: Expression; } export interface AssertClause extends Node { readonly kind: SyntaxKind.AssertClause; @@ -1702,7 +1702,7 @@ declare namespace ts { readonly name: Identifier; readonly isTypeOnly: boolean; } - export interface ExportSpecifier extends NamedDeclaration { + export interface ExportSpecifier extends NamedDeclaration, JSDocContainer { readonly kind: SyntaxKind.ExportSpecifier; readonly parent: NamedExports; readonly isTypeOnly: boolean; @@ -1720,19 +1720,23 @@ declare namespace ts { readonly parent: ImportClause & { readonly isTypeOnly: true; }; - } | ImportSpecifier & { + } | ImportSpecifier & ({ + readonly isTypeOnly: true; + } | { readonly parent: NamedImports & { readonly parent: ImportClause & { readonly isTypeOnly: true; }; }; - } | ExportSpecifier & { + }) | ExportSpecifier & ({ + readonly isTypeOnly: true; + } | { readonly parent: NamedExports & { readonly parent: ExportDeclaration & { readonly isTypeOnly: true; }; }; - }; + }); /** * This is either an `export =` or an `export default` declaration. * Unless `isExportEquals` is set, this node was parsed as an `export default`. @@ -3078,6 +3082,7 @@ declare namespace ts { ES2019 = 6, ES2020 = 7, ES2021 = 8, + ES2022 = 9, ESNext = 99, JSON = 100, Latest = 99 @@ -3343,7 +3348,7 @@ declare namespace ts { createTrue(): TrueLiteral; createFalse(): FalseLiteral; createModifier<T extends ModifierSyntaxKind>(kind: T): ModifierToken<T>; - createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[]; + createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[] | undefined; createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName; updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName; createComputedPropertyName(expression: Expression): ComputedPropertyName; @@ -3575,8 +3580,8 @@ declare namespace ts { updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; createAssertClause(elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause; updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause; - createAssertEntry(name: AssertionKey, value: StringLiteral): AssertEntry; - updateAssertEntry(node: AssertEntry, name: AssertionKey, value: StringLiteral): AssertEntry; + createAssertEntry(name: AssertionKey, value: Expression): AssertEntry; + updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry; createNamespaceImport(name: Identifier): NamespaceImport; updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport; createNamespaceExport(name: Identifier): NamespaceExport; @@ -5351,7 +5356,11 @@ declare namespace ts { traceResolution?: boolean; [option: string]: CompilerOptionsValue | undefined; } - type ReportEmitErrorSummary = (errorCount: number) => void; + type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void; + interface ReportFileInError { + fileName: string; + line: number; + } interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> { createDirectory?(path: string): void; /** @@ -5559,6 +5568,7 @@ declare namespace ts { isTypeParameter(): this is TypeParameter; isClassOrInterface(): this is InterfaceType; isClass(): this is InterfaceType; + isIndexType(): this is IndexType; } interface TypeReference { typeArguments?: readonly Type[]; @@ -5567,6 +5577,7 @@ declare namespace ts { getDeclaration(): SignatureDeclaration; getTypeParameters(): TypeParameter[] | undefined; getParameters(): Symbol[]; + getTypeParameterAtPosition(pos: number): Type; getReturnType(): Type; getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[]; getJsDocTags(): JSDocTagInfo[]; @@ -5753,8 +5764,9 @@ declare namespace ts { * @param position A zero-based index of the character where you want the entries * @param options An object describing how the request was triggered and what kinds * of code actions can be returned with the completions. + * @param formattingSettings settings needed for calling formatting functions. */ - getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined): WithMetadata<CompletionInfo> | undefined; + getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata<CompletionInfo> | undefined; /** * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`. * @@ -6586,6 +6598,7 @@ declare namespace ts { externalModuleName = "external module name", /** * <JsxTagName attribute1 attribute2={0} /> + * @deprecated */ jsxAttribute = "JSX attribute", /** String literal */ @@ -6855,7 +6868,7 @@ declare namespace ts { /** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */ const createModifier: <T extends ModifierSyntaxKind>(kind: T) => ModifierToken<T>; /** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */ - const createModifiersFromModifierFlags: (flags: ModifierFlags) => Modifier[]; + const createModifiersFromModifierFlags: (flags: ModifierFlags) => Modifier[] | undefined; /** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */ const createQualifiedName: (left: EntityName, right: string | Identifier) => QualifiedName; /** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */ |