diff options
Diffstat (limited to 'cli/dts')
-rw-r--r-- | cli/dts/lib.dom.d.ts | 185 | ||||
-rw-r--r-- | cli/dts/lib.dom.iterable.d.ts | 7 | ||||
-rw-r--r-- | cli/dts/lib.es2015.iterable.d.ts | 8 | ||||
-rw-r--r-- | cli/dts/lib.es2015.promise.d.ts | 14 | ||||
-rw-r--r-- | cli/dts/lib.es2015.proxy.d.ts | 1 | ||||
-rw-r--r-- | cli/dts/lib.es2015.symbol.wellknown.d.ts | 5 | ||||
-rw-r--r-- | cli/dts/lib.es2017.sharedmemory.d.ts | 4 | ||||
-rw-r--r-- | cli/dts/lib.es2020.d.ts | 1 | ||||
-rw-r--r-- | cli/dts/lib.es2020.intl.d.ts | 4 | ||||
-rw-r--r-- | cli/dts/lib.es2020.sharedmemory.d.ts | 99 | ||||
-rw-r--r-- | cli/dts/lib.es5.d.ts | 28 | ||||
-rw-r--r-- | cli/dts/lib.esnext.weakref.d.ts | 31 | ||||
-rw-r--r-- | cli/dts/lib.webworker.d.ts | 64 | ||||
-rw-r--r-- | cli/dts/lib.webworker.iterable.d.ts | 166 | ||||
-rw-r--r-- | cli/dts/typescript.d.ts | 554 |
15 files changed, 822 insertions, 349 deletions
diff --git a/cli/dts/lib.dom.d.ts b/cli/dts/lib.dom.d.ts index dcb43e13d..4624ef1b2 100644 --- a/cli/dts/lib.dom.d.ts +++ b/cli/dts/lib.dom.d.ts @@ -155,29 +155,21 @@ interface AudioWorkletNodeOptions extends AudioNodeOptions { interface AuthenticationExtensionsClientInputs { appid?: string; - authnSel?: AuthenticatorSelectionList; - exts?: boolean; - loc?: boolean; - txAuthGeneric?: txAuthGenericArg; - txAuthSimple?: string; - uvi?: boolean; + appidExclude?: string; + credProps?: boolean; uvm?: boolean; } interface AuthenticationExtensionsClientOutputs { appid?: boolean; - authnSel?: boolean; - exts?: AuthenticationExtensionsSupported; - loc?: Coordinates; - txAuthGeneric?: ArrayBuffer; - txAuthSimple?: string; - uvi?: ArrayBuffer; + credProps?: CredentialPropertiesOutput; uvm?: UvmEntries; } interface AuthenticatorSelectionCriteria { authenticatorAttachment?: AuthenticatorAttachment; requireResidentKey?: boolean; + residentKey?: ResidentKeyRequirement; userVerification?: UserVerificationRequirement; } @@ -304,6 +296,10 @@ interface CredentialCreationOptions { signal?: AbortSignal; } +interface CredentialPropertiesOutput { + rk?: boolean; +} + interface CredentialRequestOptions { mediation?: CredentialMediationRequirement; publicKey?: PublicKeyCredentialRequestOptions; @@ -669,6 +665,8 @@ interface KeyboardEventInit extends EventModifierInit { code?: string; isComposing?: boolean; key?: string; + /** @deprecated */ + keyCode?: number; location?: number; repeat?: boolean; } @@ -1116,7 +1114,6 @@ interface PublicKeyCredentialDescriptor { } interface PublicKeyCredentialEntity { - icon?: string; name: string; } @@ -1916,11 +1913,6 @@ interface WorkletOptions { credentials?: RequestCredentials; } -interface txAuthGenericArg { - content: ArrayBuffer; - contentType: string; -} - interface EventListener { (evt: Event): void; } @@ -3640,17 +3632,6 @@ declare var ConvolverNode: { new(context: BaseAudioContext, options?: ConvolverOptions): ConvolverNode; }; -/** The position and altitude of the device on Earth, as well as the accuracy with which these properties are calculated. */ -interface Coordinates { - readonly accuracy: number; - readonly altitude: number | null; - readonly altitudeAccuracy: number | null; - readonly heading: number | null; - readonly latitude: number; - readonly longitude: number; - readonly speed: number | null; -} - /** This Streams API interface providesĀ a built-in byte length queuing strategy that can be used when constructing streams. */ interface CountQueuingStrategy extends QueuingStrategy { highWaterMark: number; @@ -3819,7 +3800,7 @@ declare var DOMException: { /** An object providing methods which are not dependent on any particular document. Such an object is returned by the Document.implementation property. */ interface DOMImplementation { - createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null): Document; + createDocument(namespace: string | null, qualifiedName: string | null, doctype?: DocumentType | null): XMLDocument; createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType; createHTMLDocument(title?: string): Document; /** @deprecated */ @@ -4187,7 +4168,7 @@ interface DataTransfer { * * The possible values are "none", "copy", "link", and "move". */ - dropEffect: string; + dropEffect: "none" | "copy" | "link" | "move"; /** * Returns the kinds of operations that are to be allowed. * @@ -4195,7 +4176,7 @@ interface DataTransfer { * * The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized", */ - effectAllowed: string; + effectAllowed: "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized"; /** * Returns a FileList of the files being dragged, if any. */ @@ -5168,8 +5149,8 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp * Returns the qualified names of all element's attributes. Can contain duplicates. */ getAttributeNames(): string[]; - getAttributeNode(name: string): Attr | null; - getAttributeNodeNS(namespaceURI: string, localName: string): Attr | null; + getAttributeNode(qualifiedName: string): Attr | null; + getAttributeNodeNS(namespace: string | null, localName: string): Attr | null; getBoundingClientRect(): DOMRect; getClientRects(): DOMRectList; /** @@ -5679,6 +5660,52 @@ interface Geolocation { watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number; } +declare var Geolocation: { + prototype: Geolocation; + new(): Geolocation; +}; + +interface GeolocationCoordinates { + readonly accuracy: number; + readonly altitude: number | null; + readonly altitudeAccuracy: number | null; + readonly heading: number | null; + readonly latitude: number; + readonly longitude: number; + readonly speed: number | null; +} + +declare var GeolocationCoordinates: { + prototype: GeolocationCoordinates; + new(): GeolocationCoordinates; +}; + +interface GeolocationPosition { + readonly coords: GeolocationCoordinates; + readonly timestamp: number; +} + +declare var GeolocationPosition: { + prototype: GeolocationPosition; + new(): GeolocationPosition; +}; + +interface GeolocationPositionError { + readonly code: number; + readonly message: string; + readonly PERMISSION_DENIED: number; + readonly POSITION_UNAVAILABLE: number; + readonly TIMEOUT: number; +} + +declare var GeolocationPositionError: { + prototype: GeolocationPositionError; + new(): GeolocationPositionError; + readonly PERMISSION_DENIED: number; + readonly POSITION_UNAVAILABLE: number; + readonly TIMEOUT: number; +}; + interface GlobalEventHandlersEventMap { "abort": UIEvent; "animationcancel": AnimationEvent; @@ -8947,6 +8974,10 @@ interface HTMLVideoElement extends HTMLMediaElement { */ height: number; /** + * Gets or sets the playsinline of the video element. for example, On iPhone, video elements will now be allowed to play inline, and will not automatically enter fullscreen mode when playback begins. + */ + playsInline: boolean; + /** * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available. */ poster: string; @@ -9023,12 +9054,6 @@ declare var History: { new(): History; }; -interface HkdfCtrParams extends Algorithm { - context: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - hash: string | Algorithm; - label: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; -} - interface IDBArrayKey extends Array<IDBValidKey> { } @@ -9130,7 +9155,7 @@ interface IDBDatabase extends EventTarget { * * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction. */ - createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; + createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore; /** * Deletes the object store with the given name. * @@ -9578,8 +9603,8 @@ interface ImageData { declare var ImageData: { prototype: ImageData; - new(width: number, height: number): ImageData; - new(array: Uint8ClampedArray, width: number, height?: number): ImageData; + new(sw: number, sh: number): ImageData; + new(data: Uint8ClampedArray, sw: number, sh?: number): ImageData; }; interface InnerHTML { @@ -11787,21 +11812,6 @@ declare var PopStateEvent: { new(type: string, eventInitDict?: PopStateEventInit): PopStateEvent; }; -/** The position of the concerned device at a given time. The position, represented by a Coordinates object, comprehends the 2D position of the device, on a spheroid representing the Earth, but also its altitude and its speed. */ -interface Position { - readonly coords: Coordinates; - readonly timestamp: number; -} - -/** The reason of an error occurring when using the geolocating device. */ -interface PositionError { - readonly code: number; - readonly message: string; - readonly PERMISSION_DENIED: number; - readonly POSITION_UNAVAILABLE: number; - readonly TIMEOUT: number; -} - /** A processing instruction embeds application-specific instructions in XML which can be ignored by other applications that don't recognize them. */ interface ProcessingInstruction extends CharacterData, LinkStyle { readonly ownerDocument: Document; @@ -12493,6 +12503,11 @@ interface ReadableByteStreamController { error(error?: any): void; } +declare var ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new(): ReadableByteStreamController; +}; + /** 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; @@ -12517,12 +12532,22 @@ interface ReadableStreamBYOBReader { releaseLock(): void; } +declare var ReadableStreamBYOBReader: { + prototype: ReadableStreamBYOBReader; + new(): ReadableStreamBYOBReader; +}; + interface ReadableStreamBYOBRequest { readonly view: ArrayBufferView; respond(bytesWritten: number): void; respondWithNewView(view: ArrayBufferView): void; } +declare var ReadableStreamBYOBRequest: { + prototype: ReadableStreamBYOBRequest; + new(): ReadableStreamBYOBRequest; +}; + interface ReadableStreamDefaultController<R = any> { readonly desiredSize: number | null; close(): void; @@ -12530,6 +12555,11 @@ interface ReadableStreamDefaultController<R = any> { error(error?: any): void; } +declare var ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; +}; + interface ReadableStreamDefaultReader<R = any> { readonly closed: Promise<void>; cancel(reason?: any): Promise<void>; @@ -12537,6 +12567,11 @@ interface ReadableStreamDefaultReader<R = any> { releaseLock(): void; } +declare var ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(): ReadableStreamDefaultReader; +}; + interface ReadableStreamReader<R = any> { cancel(): Promise<void>; read(): Promise<ReadableStreamReadResult<R>>; @@ -15399,16 +15434,16 @@ declare var StyleSheetList: { /** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */ interface SubtleCrypto { decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>; - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>; + deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>; exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise<ArrayBuffer>; exportKey(format: string, key: CryptoKey): Promise<JsonWebKey | ArrayBuffer>; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>; importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; @@ -15884,6 +15919,11 @@ interface TransformStreamDefaultController<O = any> { terminate(): void; } +declare var TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new(): TransformStreamDefaultController; +}; + /** Events providing information related to transitions. */ interface TransitionEvent extends Event { readonly elapsedTime: number; @@ -18684,6 +18724,11 @@ interface WritableStreamDefaultController { error(error?: any): void; } +declare var WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new(): WritableStreamDefaultController; +}; + /** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */ interface WritableStreamDefaultWriter<W = any> { readonly closed: Promise<void>; @@ -18695,6 +18740,11 @@ interface WritableStreamDefaultWriter<W = any> { write(chunk: W): Promise<void>; } +declare var WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new(): WritableStreamDefaultWriter; +}; + /** An XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents. */ interface XMLDocument extends Document { addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -19197,11 +19247,11 @@ interface PerformanceObserverCallback { } interface PositionCallback { - (position: Position): void; + (position: GeolocationPosition): void; } interface PositionErrorCallback { - (positionError: PositionError): void; + (positionError: GeolocationPositionError): void; } interface QueuingStrategySizeCallback<T = any> { @@ -19481,7 +19531,8 @@ declare var location: Location; declare var locationbar: BarProp; declare var menubar: BarProp; declare var msContentScript: ExtensionScriptApis; -declare const name: never; +/** @deprecated */ +declare const name: void; declare var navigator: Navigator; declare var offscreenBuffering: string | boolean; declare var oncompassneedscalibration: ((this: Window, ev: Event) => any) | null; @@ -19911,9 +19962,6 @@ type PerformanceEntryList = PerformanceEntry[]; type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>; type VibratePattern = number | number[]; type COSEAlgorithmIdentifier = number; -type AuthenticatorSelectionList = AAGUID[]; -type AAGUID = BufferSource; -type AuthenticationExtensionsSupported = string[]; type UvmEntry = number[]; type UvmEntries = UvmEntry[]; type AlgorithmIdentifier = string | Algorithm; @@ -19953,7 +20001,7 @@ type WindowProxy = Window; type AlignSetting = "center" | "end" | "left" | "right" | "start"; type AnimationPlayState = "finished" | "idle" | "paused" | "running"; type AppendMode = "segments" | "sequence"; -type AttestationConveyancePreference = "direct" | "indirect" | "none"; +type AttestationConveyancePreference = "direct" | "enterprise" | "indirect" | "none"; type AudioContextLatencyCategory = "balanced" | "interactive" | "playback"; type AudioContextState = "closed" | "running" | "suspended"; type AuthenticatorAttachment = "cross-platform" | "platform"; @@ -20065,6 +20113,7 @@ type RequestCredentials = "include" | "omit" | "same-origin"; type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt"; type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin"; type RequestRedirect = "error" | "follow" | "manual"; +type ResidentKeyRequirement = "discouraged" | "preferred" | "required"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; type ScopedCredentialType = "ScopedCred"; diff --git a/cli/dts/lib.dom.iterable.d.ts b/cli/dts/lib.dom.iterable.d.ts index 1200443b3..ebd56d767 100644 --- a/cli/dts/lib.dom.iterable.d.ts +++ b/cli/dts/lib.dom.iterable.d.ts @@ -129,6 +129,13 @@ interface Headers { values(): IterableIterator<string>; } +interface IDBDatabase { + /** + * Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. + */ + transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode): IDBTransaction; +} + interface IDBObjectStore { /** * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException. diff --git a/cli/dts/lib.es2015.iterable.d.ts b/cli/dts/lib.es2015.iterable.d.ts index c2aae0617..0dcbcfab2 100644 --- a/cli/dts/lib.es2015.iterable.d.ts +++ b/cli/dts/lib.es2015.iterable.d.ts @@ -174,7 +174,7 @@ interface Set<T> { */ entries(): IterableIterator<[T, T]>; /** - * Despite its name, returns an iterable of the values in the set, + * Despite its name, returns an iterable of the values in the set. */ keys(): IterableIterator<T>; @@ -194,7 +194,7 @@ interface ReadonlySet<T> { entries(): IterableIterator<[T, T]>; /** - * Despite its name, returns an iterable of the values in the set, + * Despite its name, returns an iterable of the values in the set. */ keys(): IterableIterator<T>; @@ -242,10 +242,6 @@ interface PromiseConstructor { race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>; } -declare namespace Reflect { - function enumerate(target: object): IterableIterator<any>; -} - interface String { /** Iterator */ [Symbol.iterator](): IterableIterator<string>; diff --git a/cli/dts/lib.es2015.promise.d.ts b/cli/dts/lib.es2015.promise.d.ts index 68dcd8cfe..0f3f59cbb 100644 --- a/cli/dts/lib.es2015.promise.d.ts +++ b/cli/dts/lib.es2015.promise.d.ts @@ -30,7 +30,7 @@ interface PromiseConstructor { * a resolve callback used to resolve the promise with a value or the result of another promise, * and a reject callback used to reject the promise with a provided reason or error. */ - new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>; + new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises @@ -134,17 +134,17 @@ interface PromiseConstructor { reject<T = never>(reason?: any): Promise<T>; /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise<void>; + + /** * Creates a new resolved promise for the provided value. * @param value A promise. * @returns A promise whose internal state matches the provided promise. */ resolve<T>(value: T | PromiseLike<T>): Promise<T>; - - /** - * Creates a new resolved promise . - * @returns A resolved promise. - */ - resolve(): Promise<void>; } declare var Promise: PromiseConstructor; diff --git a/cli/dts/lib.es2015.proxy.d.ts b/cli/dts/lib.es2015.proxy.d.ts index 19e9d5aa6..e9d246e20 100644 --- a/cli/dts/lib.es2015.proxy.d.ts +++ b/cli/dts/lib.es2015.proxy.d.ts @@ -29,7 +29,6 @@ interface ProxyHandler<T extends object> { set? (target: T, p: PropertyKey, value: any, receiver: any): boolean; deleteProperty? (target: T, p: PropertyKey): boolean; defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean; - enumerate? (target: T): PropertyKey[]; ownKeys? (target: T): PropertyKey[]; apply? (target: T, thisArg: any, argArray?: any): any; construct? (target: T, argArray: any, newTarget?: any): object; diff --git a/cli/dts/lib.es2015.symbol.wellknown.d.ts b/cli/dts/lib.es2015.symbol.wellknown.d.ts index d3a54c2dc..b2831957a 100644 --- a/cli/dts/lib.es2015.symbol.wellknown.d.ts +++ b/cli/dts/lib.es2015.symbol.wellknown.d.ts @@ -83,6 +83,11 @@ interface SymbolConstructor { } interface Symbol { + /** + * Converts a Symbol object to a symbol. + */ + [Symbol.toPrimitive](hint: string): symbol; + readonly [Symbol.toStringTag]: string; } diff --git a/cli/dts/lib.es2017.sharedmemory.d.ts b/cli/dts/lib.es2017.sharedmemory.d.ts index 43689e7c8..3a4ea26bd 100644 --- a/cli/dts/lib.es2017.sharedmemory.d.ts +++ b/cli/dts/lib.es2017.sharedmemory.d.ts @@ -27,10 +27,6 @@ interface SharedArrayBuffer { */ readonly byteLength: number; - /* - * The SharedArrayBuffer constructor's length property whose value is 1. - */ - length: number; /** * Returns a section of an SharedArrayBuffer. */ diff --git a/cli/dts/lib.es2020.d.ts b/cli/dts/lib.es2020.d.ts index 307c7d1b5..3e739ac7f 100644 --- a/cli/dts/lib.es2020.d.ts +++ b/cli/dts/lib.es2020.d.ts @@ -21,6 +21,7 @@ and limitations under the License. /// <reference lib="es2019" /> /// <reference lib="es2020.bigint" /> /// <reference lib="es2020.promise" /> +/// <reference lib="es2020.sharedmemory" /> /// <reference lib="es2020.string" /> /// <reference lib="es2020.symbol.wellknown" /> /// <reference lib="es2020.intl" /> diff --git a/cli/dts/lib.es2020.intl.d.ts b/cli/dts/lib.es2020.intl.d.ts index 4b1093db2..dc31f5e03 100644 --- a/cli/dts/lib.es2020.intl.d.ts +++ b/cli/dts/lib.es2020.intl.d.ts @@ -283,13 +283,17 @@ declare namespace Intl { }; interface NumberFormatOptions { + compactDisplay?: string; notation?: string; + signDisplay?: string; unit?: string; unitDisplay?: string; } interface ResolvedNumberFormatOptions { + compactDisplay?: string; notation?: string; + signDisplay?: string; unit?: string; unitDisplay?: string; } diff --git a/cli/dts/lib.es2020.sharedmemory.d.ts b/cli/dts/lib.es2020.sharedmemory.d.ts new file mode 100644 index 000000000..f86c5ad50 --- /dev/null +++ b/cli/dts/lib.es2020.sharedmemory.d.ts @@ -0,0 +1,99 @@ +/*! ***************************************************************************** +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 Atomics { + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; + + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; + + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared BigInt64Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: BigInt64Array, index: number, count?: number): number; + + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; +} diff --git a/cli/dts/lib.es5.d.ts b/cli/dts/lib.es5.d.ts index 9b359f8bc..a7c35dbcf 100644 --- a/cli/dts/lib.es5.d.ts +++ b/cli/dts/lib.es5.d.ts @@ -1067,7 +1067,7 @@ interface JSON { /** * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. + * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. */ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; @@ -1396,7 +1396,7 @@ interface ArrayConstructor { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; - isArray(arg: any): arg is any[]; + isArray<T>(arg: T | {}): arg is T extends readonly any[] ? (unknown extends T ? never : readonly any[]) : any[]; readonly prototype: any[]; } @@ -1416,7 +1416,7 @@ declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void; declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; -declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>; +declare type PromiseConstructorLike = new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>; interface PromiseLike<T> { /** @@ -1529,6 +1529,26 @@ type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => i type InstanceType<T extends new (...args: any) => any> = T extends new (...args: any) => infer R ? R : any; /** + * Convert string literal type to uppercase + */ +type Uppercase<S extends string> = intrinsic; + +/** + * Convert string literal type to lowercase + */ +type Lowercase<S extends string> = intrinsic; + +/** + * Convert first character of string literal type to uppercase + */ +type Capitalize<S extends string> = intrinsic; + +/** + * Convert first character of string literal type to lowercase + */ +type Uncapitalize<S extends string> = intrinsic; + +/** * Marker for contextual 'this' type */ interface ThisType<T> { } @@ -1712,6 +1732,7 @@ interface DataView { } interface DataViewConstructor { + readonly prototype: DataView; new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView; } declare var DataView: DataViewConstructor; @@ -4283,6 +4304,7 @@ declare namespace Intl { style?: string; currency?: string; currencyDisplay?: string; + currencySign?: string; useGrouping?: boolean; minimumIntegerDigits?: number; minimumFractionDigits?: number; diff --git a/cli/dts/lib.esnext.weakref.d.ts b/cli/dts/lib.esnext.weakref.d.ts index c0b9b8508..15a6bc60e 100644 --- a/cli/dts/lib.esnext.weakref.d.ts +++ b/cli/dts/lib.esnext.weakref.d.ts @@ -13,34 +13,37 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ + + /// <reference no-default-lib="true"/> + interface WeakRef<T extends object> { - readonly [Symbol.toStringTag]: "WeakRef"; + readonly [Symbol.toStringTag]: "WeakRef"; - /** + /** * Returns the WeakRef instance's target object, or undefined if the target object has been * reclaimed. */ - deref(): T | undefined; + deref(): T | undefined; } interface WeakRefConstructor { - readonly prototype: WeakRef<any>; + readonly prototype: WeakRef<any>; - /** + /** * Creates a WeakRef instance for the given target object. * @param target The target object for the WeakRef instance. */ - new <T extends object>(target?: T): WeakRef<T>; + new<T extends object>(target?: T): WeakRef<T>; } declare var WeakRef: WeakRefConstructor; interface FinalizationRegistry { - readonly [Symbol.toStringTag]: "FinalizationRegistry"; + readonly [Symbol.toStringTag]: "FinalizationRegistry"; - /** + /** * Registers an object with the registry. * @param target The target object to register. * @param heldValue The value to pass to the finalizer for this object. This cannot be the @@ -49,24 +52,24 @@ interface FinalizationRegistry { * object. If provided (and not undefined), this must be an object. If not provided, the target * cannot be unregistered. */ - register(target: object, heldValue: any, unregisterToken?: object): void; + register(target: object, heldValue: any, unregisterToken?: object): void; - /** + /** * Unregisters an object from the registry. * @param unregisterToken The token that was used as the unregisterToken argument when calling * register to register the target object. */ - unregister(unregisterToken: object): void; + unregister(unregisterToken: object): void; } interface FinalizationRegistryConstructor { - readonly prototype: FinalizationRegistry; + readonly prototype: FinalizationRegistry; - /** + /** * Creates a finalization registry with an associated cleanup callback * @param cleanupCallback The callback to call after an object in the registry has been reclaimed. */ - new (cleanupCallback: (heldValue: any) => void): FinalizationRegistry; + new(cleanupCallback: (heldValue: any) => void): FinalizationRegistry; } declare var FinalizationRegistry: FinalizationRegistryConstructor; diff --git a/cli/dts/lib.webworker.d.ts b/cli/dts/lib.webworker.d.ts index 50be901ae..87a1e77a1 100644 --- a/cli/dts/lib.webworker.d.ts +++ b/cli/dts/lib.webworker.d.ts @@ -214,6 +214,12 @@ interface GetNotificationOptions { tag?: string; } +interface HkdfParams extends Algorithm { + hash: HashAlgorithmIdentifier; + info: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; +} + interface HmacImportParams extends Algorithm { hash: HashAlgorithmIdentifier; length?: number; @@ -1674,12 +1680,6 @@ declare var Headers: { new(init?: HeadersInit): Headers; }; -interface HkdfCtrParams extends Algorithm { - context: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - hash: string | Algorithm; - label: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; -} - interface IDBArrayKey extends Array<IDBValidKey> { } @@ -1781,7 +1781,7 @@ interface IDBDatabase extends EventTarget { * * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction. */ - createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; + createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore; /** * Deletes the object store with the given name. * @@ -2219,8 +2219,8 @@ interface ImageData { declare var ImageData: { prototype: ImageData; - new(width: number, height: number): ImageData; - new(array: Uint8ClampedArray, width: number, height?: number): ImageData; + new(sw: number, sh: number): ImageData; + new(data: Uint8ClampedArray, sw: number, sh?: number): ImageData; }; /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */ @@ -2735,6 +2735,11 @@ interface ReadableByteStreamController { error(error?: any): void; } +declare var ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new(): ReadableByteStreamController; +}; + /** 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; @@ -2759,12 +2764,22 @@ interface ReadableStreamBYOBReader { releaseLock(): void; } +declare var ReadableStreamBYOBReader: { + prototype: ReadableStreamBYOBReader; + new(): ReadableStreamBYOBReader; +}; + interface ReadableStreamBYOBRequest { readonly view: ArrayBufferView; respond(bytesWritten: number): void; respondWithNewView(view: ArrayBufferView): void; } +declare var ReadableStreamBYOBRequest: { + prototype: ReadableStreamBYOBRequest; + new(): ReadableStreamBYOBRequest; +}; + interface ReadableStreamDefaultController<R = any> { readonly desiredSize: number | null; close(): void; @@ -2772,6 +2787,11 @@ interface ReadableStreamDefaultController<R = any> { error(error?: any): void; } +declare var ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; +}; + interface ReadableStreamDefaultReader<R = any> { readonly closed: Promise<void>; cancel(reason?: any): Promise<void>; @@ -2779,6 +2799,11 @@ interface ReadableStreamDefaultReader<R = any> { releaseLock(): void; } +declare var ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(): ReadableStreamDefaultReader; +}; + interface ReadableStreamReader<R = any> { cancel(): Promise<void>; read(): Promise<ReadableStreamReadResult<R>>; @@ -3054,16 +3079,16 @@ declare var StorageManager: { /** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */ interface SubtleCrypto { decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>; - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>; + deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>; exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise<ArrayBuffer>; exportKey(format: string, key: CryptoKey): Promise<JsonWebKey | ArrayBuffer>; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>; importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; @@ -3256,6 +3281,11 @@ interface TransformStreamDefaultController<O = any> { terminate(): void; } +declare var TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new(): TransformStreamDefaultController; +}; + /** The URLĀ interface represents an object providing static methods used for creating object URLs. */ interface URL { hash: string; @@ -5532,6 +5562,11 @@ interface WritableStreamDefaultController { error(error?: any): void; } +declare var WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new(): WritableStreamDefaultController; +}; + /** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */ interface WritableStreamDefaultWriter<W = any> { readonly closed: Promise<void>; @@ -5543,6 +5578,11 @@ interface WritableStreamDefaultWriter<W = any> { write(chunk: W): Promise<void>; } +declare var WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new(): WritableStreamDefaultWriter; +}; + interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap { "readystatechange": Event; } diff --git a/cli/dts/lib.webworker.iterable.d.ts b/cli/dts/lib.webworker.iterable.d.ts new file mode 100644 index 000000000..cef75d9e6 --- /dev/null +++ b/cli/dts/lib.webworker.iterable.d.ts @@ -0,0 +1,166 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + + +/// <reference no-default-lib="true"/> + + +///////////////////////////// +/// Worker Iterable APIs +///////////////////////////// + +interface Cache { + addAll(requests: Iterable<RequestInfo>): Promise<void>; +} + +interface CanvasPathDrawingStyles { + setLineDash(segments: Iterable<number>): void; +} + +interface DOMStringList { + [Symbol.iterator](): IterableIterator<string>; +} + +interface FileList { + [Symbol.iterator](): IterableIterator<File>; +} + +interface FormData { + [Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>; + /** + * Returns an array of key, value pairs for every entry in the list. + */ + entries(): IterableIterator<[string, FormDataEntryValue]>; + /** + * Returns a list of keys in the list. + */ + keys(): IterableIterator<string>; + /** + * Returns a list of values in the list. + */ + values(): IterableIterator<FormDataEntryValue>; +} + +interface Headers { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all key/value pairs contained in this object. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. + */ + keys(): IterableIterator<string>; + /** + * Returns an iterator allowing to go through all values of the key/value pairs contained in this object. + */ + values(): IterableIterator<string>; +} + +interface IDBDatabase { + /** + * Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. + */ + transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode): IDBTransaction; +} + +interface IDBObjectStore { + /** + * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException. + * + * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction. + */ + createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex; +} + +interface URLSearchParams { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an array of key, value pairs for every entry in the search params. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns a list of keys in the search params. + */ + keys(): IterableIterator<string>; + /** + * Returns a list of values in the search params. + */ + values(): IterableIterator<string>; +} + +interface WEBGL_draw_buffers { + drawBuffersWEBGL(buffers: Iterable<GLenum>): 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; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void; + drawBuffers(buffers: Iterable<GLenum>): void; + getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any; + getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): Iterable<GLuint> | null; + invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void; + invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; + transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void; + vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void; +} + +interface WebGL2RenderingContextOverloads { + uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; +} + +interface WebGLRenderingContextBase { + vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void; + vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void; + vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void; + vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void; +} + +interface WebGLRenderingContextOverloads { + uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; + uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; + uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; + uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; + uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; + uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; + uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; + uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void; +} diff --git a/cli/dts/typescript.d.ts b/cli/dts/typescript.d.ts index 67e35224b..7c6c6301d 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.0"; + const versionMajorMinor = "4.1"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -240,207 +240,212 @@ declare namespace ts { DeclareKeyword = 133, GetKeyword = 134, InferKeyword = 135, - IsKeyword = 136, - KeyOfKeyword = 137, - ModuleKeyword = 138, - NamespaceKeyword = 139, - NeverKeyword = 140, - ReadonlyKeyword = 141, - RequireKeyword = 142, - NumberKeyword = 143, - ObjectKeyword = 144, - SetKeyword = 145, - StringKeyword = 146, - SymbolKeyword = 147, - TypeKeyword = 148, - UndefinedKeyword = 149, - UniqueKeyword = 150, - UnknownKeyword = 151, - FromKeyword = 152, - GlobalKeyword = 153, - BigIntKeyword = 154, - OfKeyword = 155, - QualifiedName = 156, - ComputedPropertyName = 157, - TypeParameter = 158, - Parameter = 159, - Decorator = 160, - PropertySignature = 161, - PropertyDeclaration = 162, - MethodSignature = 163, - MethodDeclaration = 164, - Constructor = 165, - GetAccessor = 166, - SetAccessor = 167, - CallSignature = 168, - ConstructSignature = 169, - IndexSignature = 170, - TypePredicate = 171, - TypeReference = 172, - FunctionType = 173, - ConstructorType = 174, - TypeQuery = 175, - TypeLiteral = 176, - ArrayType = 177, - TupleType = 178, - OptionalType = 179, - RestType = 180, - UnionType = 181, - IntersectionType = 182, - ConditionalType = 183, - InferType = 184, - ParenthesizedType = 185, - ThisType = 186, - TypeOperator = 187, - IndexedAccessType = 188, - MappedType = 189, - LiteralType = 190, - NamedTupleMember = 191, - ImportType = 192, - ObjectBindingPattern = 193, - ArrayBindingPattern = 194, - BindingElement = 195, - ArrayLiteralExpression = 196, - ObjectLiteralExpression = 197, - PropertyAccessExpression = 198, - ElementAccessExpression = 199, - CallExpression = 200, - NewExpression = 201, - TaggedTemplateExpression = 202, - TypeAssertionExpression = 203, - ParenthesizedExpression = 204, - FunctionExpression = 205, - ArrowFunction = 206, - DeleteExpression = 207, - TypeOfExpression = 208, - VoidExpression = 209, - AwaitExpression = 210, - PrefixUnaryExpression = 211, - PostfixUnaryExpression = 212, - BinaryExpression = 213, - ConditionalExpression = 214, - TemplateExpression = 215, - YieldExpression = 216, - SpreadElement = 217, - ClassExpression = 218, - OmittedExpression = 219, - ExpressionWithTypeArguments = 220, - AsExpression = 221, - NonNullExpression = 222, - MetaProperty = 223, - SyntheticExpression = 224, - TemplateSpan = 225, - SemicolonClassElement = 226, - Block = 227, - EmptyStatement = 228, - VariableStatement = 229, - ExpressionStatement = 230, - IfStatement = 231, - DoStatement = 232, - WhileStatement = 233, - ForStatement = 234, - ForInStatement = 235, - ForOfStatement = 236, - ContinueStatement = 237, - BreakStatement = 238, - ReturnStatement = 239, - WithStatement = 240, - SwitchStatement = 241, - LabeledStatement = 242, - ThrowStatement = 243, - TryStatement = 244, - DebuggerStatement = 245, - VariableDeclaration = 246, - VariableDeclarationList = 247, - FunctionDeclaration = 248, - ClassDeclaration = 249, - InterfaceDeclaration = 250, - TypeAliasDeclaration = 251, - EnumDeclaration = 252, - ModuleDeclaration = 253, - ModuleBlock = 254, - CaseBlock = 255, - NamespaceExportDeclaration = 256, - ImportEqualsDeclaration = 257, - ImportDeclaration = 258, - ImportClause = 259, - NamespaceImport = 260, - NamedImports = 261, - ImportSpecifier = 262, - ExportAssignment = 263, - ExportDeclaration = 264, - NamedExports = 265, - NamespaceExport = 266, - ExportSpecifier = 267, - MissingDeclaration = 268, - ExternalModuleReference = 269, - JsxElement = 270, - JsxSelfClosingElement = 271, - JsxOpeningElement = 272, - JsxClosingElement = 273, - JsxFragment = 274, - JsxOpeningFragment = 275, - JsxClosingFragment = 276, - JsxAttribute = 277, - JsxAttributes = 278, - JsxSpreadAttribute = 279, - JsxExpression = 280, - CaseClause = 281, - DefaultClause = 282, - HeritageClause = 283, - CatchClause = 284, - PropertyAssignment = 285, - ShorthandPropertyAssignment = 286, - SpreadAssignment = 287, - EnumMember = 288, - UnparsedPrologue = 289, - UnparsedPrepend = 290, - UnparsedText = 291, - UnparsedInternalText = 292, - UnparsedSyntheticReference = 293, - SourceFile = 294, - Bundle = 295, - UnparsedSource = 296, - InputFiles = 297, - JSDocTypeExpression = 298, - JSDocAllType = 299, - JSDocUnknownType = 300, - JSDocNullableType = 301, - JSDocNonNullableType = 302, - JSDocOptionalType = 303, - JSDocFunctionType = 304, - JSDocVariadicType = 305, - JSDocNamepathType = 306, - JSDocComment = 307, - JSDocTypeLiteral = 308, - JSDocSignature = 309, - JSDocTag = 310, - JSDocAugmentsTag = 311, - JSDocImplementsTag = 312, - JSDocAuthorTag = 313, - JSDocDeprecatedTag = 314, - JSDocClassTag = 315, - JSDocPublicTag = 316, - JSDocPrivateTag = 317, - JSDocProtectedTag = 318, - JSDocReadonlyTag = 319, - JSDocCallbackTag = 320, - JSDocEnumTag = 321, - JSDocParameterTag = 322, - JSDocReturnTag = 323, - JSDocThisTag = 324, - JSDocTypeTag = 325, - JSDocTemplateTag = 326, - JSDocTypedefTag = 327, - JSDocPropertyTag = 328, - SyntaxList = 329, - NotEmittedStatement = 330, - PartiallyEmittedExpression = 331, - CommaListExpression = 332, - MergeDeclarationMarker = 333, - EndOfDeclarationMarker = 334, - SyntheticReferenceExpression = 335, - Count = 336, + IntrinsicKeyword = 136, + IsKeyword = 137, + KeyOfKeyword = 138, + ModuleKeyword = 139, + NamespaceKeyword = 140, + NeverKeyword = 141, + ReadonlyKeyword = 142, + RequireKeyword = 143, + NumberKeyword = 144, + ObjectKeyword = 145, + SetKeyword = 146, + StringKeyword = 147, + SymbolKeyword = 148, + TypeKeyword = 149, + UndefinedKeyword = 150, + UniqueKeyword = 151, + UnknownKeyword = 152, + FromKeyword = 153, + GlobalKeyword = 154, + BigIntKeyword = 155, + OfKeyword = 156, + QualifiedName = 157, + ComputedPropertyName = 158, + TypeParameter = 159, + Parameter = 160, + Decorator = 161, + PropertySignature = 162, + PropertyDeclaration = 163, + MethodSignature = 164, + MethodDeclaration = 165, + Constructor = 166, + GetAccessor = 167, + SetAccessor = 168, + CallSignature = 169, + ConstructSignature = 170, + IndexSignature = 171, + TypePredicate = 172, + TypeReference = 173, + FunctionType = 174, + ConstructorType = 175, + TypeQuery = 176, + TypeLiteral = 177, + ArrayType = 178, + TupleType = 179, + OptionalType = 180, + RestType = 181, + UnionType = 182, + IntersectionType = 183, + ConditionalType = 184, + InferType = 185, + ParenthesizedType = 186, + ThisType = 187, + TypeOperator = 188, + IndexedAccessType = 189, + MappedType = 190, + LiteralType = 191, + NamedTupleMember = 192, + TemplateLiteralType = 193, + TemplateLiteralTypeSpan = 194, + ImportType = 195, + ObjectBindingPattern = 196, + ArrayBindingPattern = 197, + BindingElement = 198, + ArrayLiteralExpression = 199, + ObjectLiteralExpression = 200, + PropertyAccessExpression = 201, + ElementAccessExpression = 202, + CallExpression = 203, + NewExpression = 204, + TaggedTemplateExpression = 205, + TypeAssertionExpression = 206, + ParenthesizedExpression = 207, + FunctionExpression = 208, + ArrowFunction = 209, + DeleteExpression = 210, + TypeOfExpression = 211, + VoidExpression = 212, + AwaitExpression = 213, + PrefixUnaryExpression = 214, + PostfixUnaryExpression = 215, + BinaryExpression = 216, + ConditionalExpression = 217, + TemplateExpression = 218, + YieldExpression = 219, + SpreadElement = 220, + ClassExpression = 221, + OmittedExpression = 222, + ExpressionWithTypeArguments = 223, + AsExpression = 224, + NonNullExpression = 225, + MetaProperty = 226, + SyntheticExpression = 227, + TemplateSpan = 228, + SemicolonClassElement = 229, + Block = 230, + EmptyStatement = 231, + VariableStatement = 232, + ExpressionStatement = 233, + IfStatement = 234, + DoStatement = 235, + WhileStatement = 236, + ForStatement = 237, + ForInStatement = 238, + ForOfStatement = 239, + ContinueStatement = 240, + BreakStatement = 241, + ReturnStatement = 242, + WithStatement = 243, + SwitchStatement = 244, + LabeledStatement = 245, + ThrowStatement = 246, + TryStatement = 247, + DebuggerStatement = 248, + VariableDeclaration = 249, + VariableDeclarationList = 250, + FunctionDeclaration = 251, + ClassDeclaration = 252, + InterfaceDeclaration = 253, + TypeAliasDeclaration = 254, + EnumDeclaration = 255, + ModuleDeclaration = 256, + ModuleBlock = 257, + CaseBlock = 258, + NamespaceExportDeclaration = 259, + ImportEqualsDeclaration = 260, + ImportDeclaration = 261, + ImportClause = 262, + NamespaceImport = 263, + NamedImports = 264, + ImportSpecifier = 265, + ExportAssignment = 266, + ExportDeclaration = 267, + NamedExports = 268, + NamespaceExport = 269, + ExportSpecifier = 270, + MissingDeclaration = 271, + ExternalModuleReference = 272, + JsxElement = 273, + JsxSelfClosingElement = 274, + JsxOpeningElement = 275, + JsxClosingElement = 276, + JsxFragment = 277, + JsxOpeningFragment = 278, + JsxClosingFragment = 279, + JsxAttribute = 280, + JsxAttributes = 281, + JsxSpreadAttribute = 282, + JsxExpression = 283, + CaseClause = 284, + DefaultClause = 285, + HeritageClause = 286, + CatchClause = 287, + PropertyAssignment = 288, + ShorthandPropertyAssignment = 289, + SpreadAssignment = 290, + EnumMember = 291, + UnparsedPrologue = 292, + UnparsedPrepend = 293, + UnparsedText = 294, + UnparsedInternalText = 295, + UnparsedSyntheticReference = 296, + SourceFile = 297, + Bundle = 298, + UnparsedSource = 299, + InputFiles = 300, + JSDocTypeExpression = 301, + JSDocNameReference = 302, + JSDocAllType = 303, + JSDocUnknownType = 304, + JSDocNullableType = 305, + JSDocNonNullableType = 306, + JSDocOptionalType = 307, + JSDocFunctionType = 308, + JSDocVariadicType = 309, + JSDocNamepathType = 310, + JSDocComment = 311, + JSDocTypeLiteral = 312, + JSDocSignature = 313, + JSDocTag = 314, + JSDocAugmentsTag = 315, + JSDocImplementsTag = 316, + JSDocAuthorTag = 317, + JSDocDeprecatedTag = 318, + JSDocClassTag = 319, + JSDocPublicTag = 320, + JSDocPrivateTag = 321, + JSDocProtectedTag = 322, + JSDocReadonlyTag = 323, + JSDocCallbackTag = 324, + JSDocEnumTag = 325, + JSDocParameterTag = 326, + JSDocReturnTag = 327, + JSDocThisTag = 328, + JSDocTypeTag = 329, + JSDocTemplateTag = 330, + JSDocTypedefTag = 331, + JSDocSeeTag = 332, + JSDocPropertyTag = 333, + SyntaxList = 334, + NotEmittedStatement = 335, + PartiallyEmittedExpression = 336, + CommaListExpression = 337, + MergeDeclarationMarker = 338, + EndOfDeclarationMarker = 339, + SyntheticReferenceExpression = 340, + Count = 341, FirstAssignment = 62, LastAssignment = 77, FirstCompoundAssignment = 63, @@ -448,15 +453,15 @@ declare namespace ts { FirstReservedWord = 80, LastReservedWord = 115, FirstKeyword = 80, - LastKeyword = 155, + LastKeyword = 156, FirstFutureReservedWord = 116, LastFutureReservedWord = 124, - FirstTypeNode = 171, - LastTypeNode = 192, + FirstTypeNode = 172, + LastTypeNode = 195, FirstPunctuation = 18, LastPunctuation = 77, FirstToken = 0, - LastToken = 155, + LastToken = 156, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -465,21 +470,21 @@ declare namespace ts { LastTemplateToken = 17, FirstBinaryOperator = 29, LastBinaryOperator = 77, - FirstStatement = 229, - LastStatement = 245, - FirstNode = 156, - FirstJSDocNode = 298, - LastJSDocNode = 328, - FirstJSDocTagNode = 310, - LastJSDocTagNode = 328, + FirstStatement = 232, + LastStatement = 248, + FirstNode = 157, + FirstJSDocNode = 301, + LastJSDocNode = 333, + FirstJSDocTagNode = 314, + LastJSDocTagNode = 333, } 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.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.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.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.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 KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | 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.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.StaticKeyword; - export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; + 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; export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind; @@ -610,7 +615,8 @@ declare namespace ts { None = 0, ReservedInNestedScopes = 8, Optimistic = 16, - FileLevel = 32 + FileLevel = 32, + AllowNameSubstitution = 64 } export interface Identifier extends PrimaryExpression, Declaration { readonly kind: SyntaxKind.Identifier; @@ -942,6 +948,7 @@ declare namespace ts { readonly kind: SyntaxKind.MappedType; readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken; readonly typeParameter: TypeParameterDeclaration; + readonly nameType?: TypeNode; readonly questionToken?: QuestionToken | PlusToken | MinusToken; readonly type?: TypeNode; } @@ -954,6 +961,17 @@ declare namespace ts { } export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; + export interface TemplateLiteralTypeNode extends TypeNode { + kind: SyntaxKind.TemplateLiteralType; + readonly head: TemplateHead; + readonly templateSpans: NodeArray<TemplateLiteralTypeSpan>; + } + export interface TemplateLiteralTypeSpan extends TypeNode { + readonly kind: SyntaxKind.TemplateLiteralTypeSpan; + readonly parent: TemplateLiteralTypeNode; + readonly type: TypeNode; + readonly literal: TemplateMiddle | TemplateTail; + } export interface Expression extends Node { _expressionBrand: any; } @@ -1142,15 +1160,15 @@ declare namespace ts { export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; export interface TemplateHead extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateHead; - readonly parent: TemplateExpression; + readonly parent: TemplateExpression | TemplateLiteralTypeNode; } export interface TemplateMiddle extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateMiddle; - readonly parent: TemplateSpan; + readonly parent: TemplateSpan | TemplateLiteralTypeSpan; } export interface TemplateTail extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateTail; - readonly parent: TemplateSpan; + readonly parent: TemplateSpan | TemplateLiteralTypeSpan; } export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail; export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken; @@ -1682,6 +1700,10 @@ declare namespace ts { readonly kind: SyntaxKind.JSDocTypeExpression; readonly type: TypeNode; } + export interface JSDocNameReference extends Node { + readonly kind: SyntaxKind.JSDocNameReference; + readonly name: EntityName; + } export interface JSDocType extends TypeNode { _jsDocTypeBrand: any; } @@ -1780,6 +1802,10 @@ declare namespace ts { readonly constraint: JSDocTypeExpression | undefined; readonly typeParameters: NodeArray<TypeParameterDeclaration>; } + export interface JSDocSeeTag extends JSDocTag { + readonly kind: SyntaxKind.JSDocSeeTag; + readonly name?: JSDocNameReference; + } export interface JSDocReturnTag extends JSDocTag { readonly kind: SyntaxKind.JSDocReturnTag; readonly typeExpression?: JSDocTypeExpression; @@ -2053,6 +2079,7 @@ declare namespace ts { * Gets a type checker that can be used to semantically analyze source files in the program. */ getTypeChecker(): TypeChecker; + getTypeCatalog(): readonly Type[]; getNodeCount(): number; getIdentifierCount(): number; getSymbolCount(): number; @@ -2159,7 +2186,7 @@ declare namespace ts { * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value. */ getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined; - getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined; + getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined; /** * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. * Otherwise returns its input. @@ -2180,6 +2207,7 @@ declare namespace ts { getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): readonly Symbol[]; + getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined; getContextualType(node: Expression): Type | undefined; /** * returns unknownSignature in the case of an error. @@ -2450,11 +2478,13 @@ declare namespace ts { Conditional = 16777216, Substitution = 33554432, NonPrimitive = 67108864, + TemplateLiteral = 134217728, + StringMapping = 268435456, Literal = 2944, Unit = 109440, StringOrNumberLiteral = 384, PossiblyFalsy = 117724, - StringLike = 132, + StringLike = 402653316, NumberLike = 296, BigIntLike = 2112, BooleanLike = 528, @@ -2465,10 +2495,10 @@ declare namespace ts { StructuredType = 3670016, TypeVariable = 8650752, InstantiableNonPrimitive = 58982400, - InstantiablePrimitive = 4194304, - Instantiable = 63176704, - StructuredOrInstantiable = 66846720, - Narrowable = 133970943, + InstantiablePrimitive = 406847488, + Instantiable = 465829888, + StructuredOrInstantiable = 469499904, + Narrowable = 536624127, } export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; export interface Type { @@ -2605,8 +2635,6 @@ declare namespace ts { node: ConditionalTypeNode; checkType: Type; extendsType: Type; - trueType: Type; - falseType: Type; isDistributive: boolean; inferTypeParameters?: TypeParameter[]; outerTypeParameters?: TypeParameter[]; @@ -2621,6 +2649,14 @@ declare namespace ts { resolvedTrueType: Type; resolvedFalseType: Type; } + export interface TemplateLiteralType extends InstantiableType { + texts: readonly string[]; + types: readonly Type[]; + } + export interface StringMappingType extends InstantiableType { + symbol: Symbol; + type: Type; + } export interface SubstitutionType extends InstantiableType { baseType: Type; substitute: Type; @@ -2798,6 +2834,7 @@ declare namespace ts { assumeChangesOnlyAffectDirectDependencies?: boolean; noLib?: boolean; noResolve?: boolean; + noUncheckedIndexedAccess?: boolean; out?: string; outDir?: string; outFile?: string; @@ -2808,6 +2845,7 @@ declare namespace ts { reactNamespace?: string; jsxFactory?: string; jsxFragmentFactory?: string; + jsxImportSource?: string; composite?: boolean; incremental?: boolean; tsBuildInfoFile?: string; @@ -2852,7 +2890,8 @@ declare namespace ts { enable?: boolean; include?: string[]; exclude?: string[]; - [option: string]: string[] | boolean | undefined; + disableFilenameBasedTypeAcquisition?: boolean; + [option: string]: CompilerOptionsValue | undefined; } export enum ModuleKind { None = 0, @@ -2868,7 +2907,9 @@ declare namespace ts { None = 0, Preserve = 1, React = 2, - ReactNative = 3 + ReactNative = 3, + ReactJSX = 4, + ReactJSXDev = 5 } export enum ImportsNotUsedAsValues { Remove = 0, @@ -3178,6 +3219,8 @@ declare namespace ts { updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration; createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; + createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; + updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>; createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode; updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode; @@ -3218,10 +3261,12 @@ declare namespace ts { updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; - createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; - updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; + createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; + updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; + createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; + updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern; @@ -3401,6 +3446,8 @@ declare namespace ts { updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType; createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; + createJSDocNameReference(name: EntityName): JSDocNameReference; + updateJSDocNameReference(node: JSDocNameReference, name: EntityName): JSDocNameReference; createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral; updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral; createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature; @@ -3415,6 +3462,8 @@ declare namespace ts { updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocPropertyTag; createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocTypeTag; updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag; + createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag; + updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag; createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag; updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag; createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag; @@ -4003,6 +4052,14 @@ declare namespace ts { function getOriginalNode(node: Node | undefined): Node | undefined; function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined; /** + * Iterates through the parent chain of a node and performs the callback on each parent until the callback + * returns a truthy value, then returns that value. + * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" + * At that point findAncestor returns undefined. + */ + function findAncestor<T extends Node>(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; + function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; + /** * Gets a value indicating whether a node originated in the parse tree. * * @param node The node to test. @@ -4320,6 +4377,8 @@ declare namespace ts { function isMappedTypeNode(node: Node): node is MappedTypeNode; function isLiteralTypeNode(node: Node): node is LiteralTypeNode; function isImportTypeNode(node: Node): node is ImportTypeNode; + function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan; + function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode; function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; function isBindingElement(node: Node): node is BindingElement; @@ -4424,6 +4483,7 @@ declare namespace ts { function isBundle(node: Node): node is Bundle; function isUnparsedSource(node: Node): node is UnparsedSource; function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; + function isJSDocNameReference(node: Node): node is JSDocNameReference; function isJSDocAllType(node: Node): node is JSDocAllType; function isJSDocUnknownType(node: Node): node is JSDocUnknownType; function isJSDocNullableType(node: Node): node is JSDocNullableType; @@ -5357,6 +5417,10 @@ declare namespace ts { type WithMetadata<T> = T & { metadata?: unknown; }; + enum SemanticClassificationFormat { + Original = "original", + TwentyTwenty = "2020" + } interface LanguageService { /** This is used as a part of restarting the language service. */ cleanupSemanticCache(): void; @@ -5408,10 +5472,22 @@ declare namespace ts { getCompilerOptionsDiagnostics(): Diagnostic[]; /** @deprecated Use getEncodedSyntacticClassifications instead. */ getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; /** @deprecated Use getEncodedSemanticClassifications instead. */ getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; + /** Encoded as triples of [start, length, ClassificationType]. */ getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; - getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications; + /** + * Gets semantic highlights information for a particular file. Has two formats, an older + * version used by VS and a format used by VS Code. + * + * @param fileName The path to the file + * @param position A text span to return results within + * @param format Which format to use, defaults to "original" + * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. + */ + getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; /** * Gets completion entries at a particular position in a file. * @@ -5570,6 +5646,10 @@ declare namespace ts { textSpan: TextSpan; classificationType: ClassificationTypeNames; } + interface ClassifiedSpan2020 { + textSpan: TextSpan; + classificationType: number; + } /** * Navigation bar interface designed for visual studio's dual-column layout. * This does not form a proper tree. @@ -5967,6 +6047,12 @@ declare namespace ts { isGlobalCompletion: boolean; isMemberCompletion: boolean; /** + * In the absence of `CompletionEntry["replacementSpan"], the editor may choose whether to use + * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span + * must be used to commit that completion entry. + */ + optionalReplacementSpan?: TextSpan; + /** * true when the current location also allows for a new identifier */ isNewIdentifierLocation: boolean; @@ -6509,9 +6595,9 @@ declare namespace ts { /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode; /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ - const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; + const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ - const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; + const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ const createLiteralTypeNode: (literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ |