1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

feat(cli): update to TypeScript 4.2 (#9341)

This commit is contained in:
Kitson Kelly 2021-02-25 15:16:19 +11:00 committed by GitHub
parent 097e9c44f4
commit d7837c8eb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 5979 additions and 3261 deletions

447
cli/dts/lib.dom.d.ts vendored
View file

@ -614,6 +614,10 @@ interface ImageEncodeOptions {
type?: string; type?: string;
} }
interface ImportMeta {
url: string;
}
interface InputEventInit extends UIEventInit { interface InputEventInit extends UIEventInit {
data?: string | null; data?: string | null;
inputType?: string; inputType?: string;
@ -631,7 +635,7 @@ interface IntersectionObserverEntryInit {
} }
interface IntersectionObserverInit { interface IntersectionObserverInit {
root?: Element | null; root?: Element | Document | null;
rootMargin?: string; rootMargin?: string;
threshold?: number | number[]; threshold?: number | number[];
} }
@ -662,6 +666,8 @@ interface KeyAlgorithm {
} }
interface KeyboardEventInit extends EventModifierInit { interface KeyboardEventInit extends EventModifierInit {
/** @deprecated */
charCode?: number;
code?: string; code?: string;
isComposing?: boolean; isComposing?: boolean;
key?: string; key?: string;
@ -1043,18 +1049,13 @@ interface PermissionDescriptor {
name: PermissionName; name: PermissionName;
} }
interface PipeOptions {
preventAbort?: boolean;
preventCancel?: boolean;
preventClose?: boolean;
signal?: AbortSignal;
}
interface PointerEventInit extends MouseEventInit { interface PointerEventInit extends MouseEventInit {
coalescedEvents?: PointerEvent[];
height?: number; height?: number;
isPrimary?: boolean; isPrimary?: boolean;
pointerId?: number; pointerId?: number;
pointerType?: string; pointerType?: string;
predictedEvents?: PointerEvent[];
pressure?: number; pressure?: number;
tangentialPressure?: number; tangentialPressure?: number;
tiltX?: number; tiltX?: number;
@ -1158,7 +1159,16 @@ interface PushSubscriptionOptionsInit {
interface QueuingStrategy<T = any> { interface QueuingStrategy<T = any> {
highWaterMark?: number; highWaterMark?: number;
size?: QueuingStrategySizeCallback<T>; size?: QueuingStrategySize<T>;
}
interface QueuingStrategyInit {
/**
* Creates a new ByteLengthQueuingStrategy with the provided high water mark.
*
* Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.
*/
highWaterMark: number;
} }
interface RTCAnswerOptions extends RTCOfferAnswerOptions { interface RTCAnswerOptions extends RTCOfferAnswerOptions {
@ -1259,17 +1269,36 @@ interface RTCIceCandidatePair {
interface RTCIceCandidatePairStats extends RTCStats { interface RTCIceCandidatePairStats extends RTCStats {
availableIncomingBitrate?: number; availableIncomingBitrate?: number;
availableOutgoingBitrate?: number; availableOutgoingBitrate?: number;
bytesDiscardedOnSend?: number;
bytesReceived?: number; bytesReceived?: number;
bytesSent?: number; bytesSent?: number;
circuitBreakerTriggerCount?: number;
consentExpiredTimestamp?: number;
consentRequestsSent?: number;
currentRoundTripTime?: number;
currentRtt?: number;
firstRequestTimestamp?: number;
lastPacketReceivedTimestamp?: number;
lastPacketSentTimestamp?: number;
lastRequestTimestamp?: number;
lastResponseTimestamp?: number;
localCandidateId?: string; localCandidateId?: string;
nominated?: boolean; nominated?: boolean;
packetsDiscardedOnSend?: number;
packetsReceived?: number;
packetsSent?: number;
priority?: number; priority?: number;
readable?: boolean;
remoteCandidateId?: string; remoteCandidateId?: string;
roundTripTime?: number; requestsReceived?: number;
requestsSent?: number;
responsesReceived?: number;
responsesSent?: number;
retransmissionsReceived?: number;
retransmissionsSent?: number;
state?: RTCStatsIceCandidatePairState; state?: RTCStatsIceCandidatePairState;
totalRoundTripTime?: number;
totalRtt?: number;
transportId?: string; transportId?: string;
writable?: boolean;
} }
interface RTCIceGatherOptions { interface RTCIceGatherOptions {
@ -1507,9 +1536,9 @@ interface RTCSsrcRange {
} }
interface RTCStats { interface RTCStats {
id: string; id?: string;
timestamp: number; timestamp?: number;
type: RTCStatsType; type?: RTCStatsType;
} }
interface RTCStatsEventInit extends EventInit { interface RTCStatsEventInit extends EventInit {
@ -1527,25 +1556,43 @@ interface RTCTrackEventInit extends EventInit {
} }
interface RTCTransportStats extends RTCStats { interface RTCTransportStats extends RTCStats {
activeConnection?: boolean;
bytesReceived?: number; bytesReceived?: number;
bytesSent?: number; bytesSent?: number;
dtlsCipher?: string;
dtlsState?: RTCDtlsTransportState;
iceRole?: RTCIceRole;
localCertificateId?: string; localCertificateId?: string;
packetsReceived?: number;
packetsSent?: number;
remoteCertificateId?: string; remoteCertificateId?: string;
rtcpTransportStatsId?: string; rtcpTransportStatsId?: string;
selectedCandidatePairChanges?: number;
selectedCandidatePairId?: string; selectedCandidatePairId?: string;
srtpCipher?: string;
tlsGroup?: string;
tlsVersion?: string;
} }
interface ReadableStreamReadDoneResult<T> { interface ReadableStreamDefaultReadDoneResult {
done: true; done: true;
value?: T; value?: undefined;
} }
interface ReadableStreamReadValueResult<T> { interface ReadableStreamDefaultReadValueResult<T> {
done: false; done: false;
value: T; value: T;
} }
interface ReadableWritablePair<R = any, W = any> {
readable: ReadableStream<R>;
/**
* Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
*
* Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
*/
writable: WritableStream<W>;
}
interface RegistrationOptions { interface RegistrationOptions {
scope?: string; scope?: string;
type?: WorkerType; type?: WorkerType;
@ -1607,6 +1654,10 @@ interface RequestInit {
window?: any; window?: any;
} }
interface ResizeObserverOptions {
box?: ResizeObserverBoxOptions;
}
interface ResponseInit { interface ResponseInit {
headers?: HeadersInit; headers?: HeadersInit;
status?: number; status?: number;
@ -1720,6 +1771,16 @@ interface ShareData {
url?: string; url?: string;
} }
interface SpeechRecognitionErrorEventInit extends EventInit {
error: SpeechRecognitionErrorCode;
message?: string;
}
interface SpeechRecognitionEventInit extends EventInit {
resultIndex?: number;
results: SpeechRecognitionResultList;
}
interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit { interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit {
error: SpeechSynthesisErrorCode; error: SpeechSynthesisErrorCode;
} }
@ -1766,6 +1827,30 @@ interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformat
arrayOfDomainStrings?: string[]; arrayOfDomainStrings?: string[];
} }
interface StreamPipeOptions {
preventAbort?: boolean;
preventCancel?: boolean;
/**
* Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
*
* Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
*
* Errors and closures of the source and destination streams propagate as follows:
*
* An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.
*
* An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.
*
* When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.
*
* If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.
*
* The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.
*/
preventClose?: boolean;
signal?: AbortSignal;
}
interface TextDecodeOptions { interface TextDecodeOptions {
stream?: boolean; stream?: boolean;
} }
@ -1809,10 +1894,10 @@ interface TrackEventInit extends EventInit {
} }
interface Transformer<I = any, O = any> { interface Transformer<I = any, O = any> {
flush?: TransformStreamDefaultControllerCallback<O>; flush?: TransformerFlushCallback<O>;
readableType?: undefined; readableType?: undefined;
start?: TransformStreamDefaultControllerCallback<O>; start?: TransformerStartCallback<O>;
transform?: TransformStreamDefaultControllerTransformCallback<I, O>; transform?: TransformerTransformCallback<I, O>;
writableType?: undefined; writableType?: undefined;
} }
@ -1832,26 +1917,18 @@ interface ULongRange {
min?: number; min?: number;
} }
interface UnderlyingByteSource {
autoAllocateChunkSize?: number;
cancel?: ReadableStreamErrorCallback;
pull?: ReadableByteStreamControllerCallback;
start?: ReadableByteStreamControllerCallback;
type: "bytes";
}
interface UnderlyingSink<W = any> { interface UnderlyingSink<W = any> {
abort?: WritableStreamErrorCallback; abort?: UnderlyingSinkAbortCallback;
close?: WritableStreamDefaultControllerCloseCallback; close?: UnderlyingSinkCloseCallback;
start?: WritableStreamDefaultControllerStartCallback; start?: UnderlyingSinkStartCallback;
type?: undefined; type?: undefined;
write?: WritableStreamDefaultControllerWriteCallback<W>; write?: UnderlyingSinkWriteCallback<W>;
} }
interface UnderlyingSource<R = any> { interface UnderlyingSource<R = any> {
cancel?: ReadableStreamErrorCallback; cancel?: UnderlyingSourceCancelCallback;
pull?: ReadableStreamDefaultControllerCallback<R>; pull?: UnderlyingSourcePullCallback<R>;
start?: ReadableStreamDefaultControllerCallback<R>; start?: UnderlyingSourceStartCallback<R>;
type?: undefined; type?: undefined;
} }
@ -2340,7 +2417,9 @@ declare var AudioParamMap: {
new(): AudioParamMap; new(): AudioParamMap;
}; };
/** The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed. */ /** The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed.
* @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet.
*/
interface AudioProcessingEvent extends Event { interface AudioProcessingEvent extends Event {
readonly inputBuffer: AudioBuffer; readonly inputBuffer: AudioBuffer;
readonly outputBuffer: AudioBuffer; readonly outputBuffer: AudioBuffer;
@ -2583,13 +2662,13 @@ declare var BroadcastChannel: {
/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> { interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
highWaterMark: number; readonly highWaterMark: number;
size(chunk: ArrayBufferView): number; readonly size: QueuingStrategySize<ArrayBufferView>;
} }
declare var ByteLengthQueuingStrategy: { declare var ByteLengthQueuingStrategy: {
prototype: ByteLengthQueuingStrategy; prototype: ByteLengthQueuingStrategy;
new(options: { highWaterMark: number }): ByteLengthQueuingStrategy; new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
}; };
/** A CDATA section that can be used within XML to include extended portions of unescaped text. The symbols < and & dont need escaping as they normally do when inside a CDATA section. */ /** A CDATA section that can be used within XML to include extended portions of unescaped text. The symbols < and & dont need escaping as they normally do when inside a CDATA section. */
@ -3634,13 +3713,13 @@ declare var ConvolverNode: {
/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
interface CountQueuingStrategy extends QueuingStrategy { interface CountQueuingStrategy extends QueuingStrategy {
highWaterMark: number; readonly highWaterMark: number;
size(chunk: any): 1; readonly size: QueuingStrategySize;
} }
declare var CountQueuingStrategy: { declare var CountQueuingStrategy: {
prototype: CountQueuingStrategy; prototype: CountQueuingStrategy;
new(options: { highWaterMark: number }): CountQueuingStrategy; new(init: QueuingStrategyInit): CountQueuingStrategy;
}; };
interface Credential { interface Credential {
@ -4700,6 +4779,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad
createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent;
createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent;
createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent;
createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
@ -4767,8 +4847,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad
exitPointerLock(): void; exitPointerLock(): void;
getAnimations(): Animation[]; getAnimations(): Animation[];
/** /**
* Returns a reference to the first object with the specified value of the ID or NAME attribute. * Returns a reference to the first object with the specified value of the ID attribute.
* @param elementId String that specifies the ID value. Case-insensitive. * @param elementId String that specifies the ID value.
*/ */
getElementById(elementId: string): HTMLElement | null; getElementById(elementId: string): HTMLElement | null;
/** /**
@ -4949,6 +5029,7 @@ interface DocumentEvent {
createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent;
createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent;
createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent;
createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
@ -5077,7 +5158,6 @@ interface ElementEventMap {
/** Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. */ /** Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. */
interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable { interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable {
readonly assignedSlot: HTMLSlotElement | null;
readonly attributes: NamedNodeMap; readonly attributes: NamedNodeMap;
/** /**
* Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. * Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.
@ -5632,24 +5712,7 @@ declare var GamepadPose: {
}; };
interface GenericTransformStream { interface GenericTransformStream {
/**
* Returns a readable stream whose chunks are strings resulting from running encoding's decoder on the chunks written to writable.
*/
readonly readable: ReadableStream; readonly readable: ReadableStream;
/**
* Returns a writable stream which accepts [AllowShared] BufferSource chunks and runs them through encoding's decoder before making them available to readable.
*
* Typically this will be used via the pipeThrough() method on a ReadableStream source.
*
* ```
* var decoder = new TextDecoderStream(encoding);
* byteReadable
* .pipeThrough(decoder)
* .pipeTo(textWritable);
* ```
*
* If the error mode is "fatal" and encoding's decoder returns error, both readable and writable will be errored with a TypeError.
*/
readonly writable: WritableStream; readonly writable: WritableStream;
} }
@ -5713,6 +5776,7 @@ interface GlobalEventHandlersEventMap {
"animationiteration": AnimationEvent; "animationiteration": AnimationEvent;
"animationstart": AnimationEvent; "animationstart": AnimationEvent;
"auxclick": MouseEvent; "auxclick": MouseEvent;
"beforeinput": InputEvent;
"blur": FocusEvent; "blur": FocusEvent;
"cancel": Event; "cancel": Event;
"canplay": Event; "canplay": Event;
@ -5720,6 +5784,9 @@ interface GlobalEventHandlersEventMap {
"change": Event; "change": Event;
"click": MouseEvent; "click": MouseEvent;
"close": Event; "close": Event;
"compositionend": CompositionEvent;
"compositionstart": CompositionEvent;
"compositionupdate": CompositionEvent;
"contextmenu": MouseEvent; "contextmenu": MouseEvent;
"cuechange": Event; "cuechange": Event;
"dblclick": MouseEvent; "dblclick": MouseEvent;
@ -7359,7 +7426,7 @@ interface HTMLInputElement extends HTMLElement {
* @param end The offset into the text field for the end of the selection. * @param end The offset into the text field for the end of the selection.
* @param direction The direction in which the selection is performed. * @param direction The direction in which the selection is performed.
*/ */
setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void; setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
/** /**
* Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value. * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
* @param n Value to decrement the value by. * @param n Value to decrement the value by.
@ -8655,7 +8722,6 @@ declare var HTMLTableElement: {
}; };
interface HTMLTableHeaderCellElement extends HTMLTableCellElement { interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
scope: string;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@ -8866,7 +8932,7 @@ interface HTMLTextAreaElement extends HTMLElement {
* @param end The offset into the text field for the end of the selection. * @param end The offset into the text field for the end of the selection.
* @param direction The direction in which the selection is performed. * @param direction The direction in which the selection is performed.
*/ */
setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void; setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@ -9633,7 +9699,7 @@ declare var InputEvent: {
/** provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. */ /** provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. */
interface IntersectionObserver { interface IntersectionObserver {
readonly root: Element | null; readonly root: Element | Document | null;
readonly rootMargin: string; readonly rootMargin: string;
readonly thresholds: ReadonlyArray<number>; readonly thresholds: ReadonlyArray<number>;
disconnect(): void; disconnect(): void;
@ -10572,7 +10638,8 @@ declare var MouseEvent: {
new(type: string, eventInitDict?: MouseEventInit): MouseEvent; new(type: string, eventInitDict?: MouseEventInit): MouseEvent;
}; };
/** Provides event properties that are specific to modifications to the Document Object Model (DOM) hierarchy and nodes. */ /** Provides event properties that are specific to modifications to the Document Object Model (DOM) hierarchy and nodes.
* @deprecated DOM4 [DOM] provides a new mechanism using a MutationObserver interface which addresses the use cases that mutation events solve, but in a more performant manner. Thus, this specification describes mutation events for reference and completeness of legacy behavior, but deprecates the use of the MutationEvent interface. */
interface MutationEvent extends Event { interface MutationEvent extends Event {
readonly attrChange: number; readonly attrChange: number;
readonly attrName: string; readonly attrName: string;
@ -11050,7 +11117,6 @@ declare var NodeList: {
}; };
interface NodeListOf<TNode extends Node> extends NodeList { interface NodeListOf<TNode extends Node> extends NodeList {
length: number;
item(index: number): TNode; item(index: number): TNode;
/** /**
* Performs the specified action for each node in an list. * Performs the specified action for each node in an list.
@ -11559,7 +11625,9 @@ declare var PerformanceMeasure: {
new(): PerformanceMeasure; new(): PerformanceMeasure;
}; };
/** The legacy PerformanceNavigation interface represents information about how the navigation to the current document was done. */ /** The legacy PerformanceNavigation interface represents information about how the navigation to the current document was done.
* @deprecated This interface is deprecated in the Navigation Timing Level 2 specification. Please use the PerformanceNavigationTiming interface instead.
*/
interface PerformanceNavigation { interface PerformanceNavigation {
readonly redirectCount: number; readonly redirectCount: number;
readonly type: number; readonly type: number;
@ -11649,7 +11717,9 @@ declare var PerformanceResourceTiming: {
new(): PerformanceResourceTiming; new(): PerformanceResourceTiming;
}; };
/** A legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page. You get a PerformanceTiming object describing your page using the window.performance.timing property. */ /** A legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page. You get a PerformanceTiming object describing your page using the window.performance.timing property.
* @deprecated This interface is deprecated in the Navigation Timing Level 2 specification. Please use the PerformanceNavigationTiming interface instead.
*/
interface PerformanceTiming { interface PerformanceTiming {
readonly connectEnd: number; readonly connectEnd: number;
readonly connectStart: number; readonly connectStart: number;
@ -11792,6 +11862,8 @@ interface PointerEvent extends MouseEvent {
readonly tiltY: number; readonly tiltY: number;
readonly twist: number; readonly twist: number;
readonly width: number; readonly width: number;
getCoalescedEvents(): PointerEvent[];
getPredictedEvents(): PointerEvent[];
} }
declare var PointerEvent: { declare var PointerEvent: {
@ -12495,64 +12567,26 @@ declare var Range: {
toString(): string; toString(): string;
}; };
interface ReadableByteStreamController {
readonly byobRequest: ReadableStreamBYOBRequest | undefined;
readonly desiredSize: number | null;
close(): void;
enqueue(chunk: ArrayBufferView): void;
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. */ /** 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> { interface ReadableStream<R = any> {
readonly locked: boolean; readonly locked: boolean;
cancel(reason?: any): Promise<void>; cancel(reason?: any): Promise<void>;
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
getReader(): ReadableStreamDefaultReader<R>; getReader(): ReadableStreamDefaultReader<R>;
pipeThrough<T>({ writable, readable }: { writable: WritableStream<R>, readable: ReadableStream<T> }, options?: PipeOptions): ReadableStream<T>; pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>; pipeTo(dest: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>]; tee(): [ReadableStream<R>, ReadableStream<R>];
} }
declare var ReadableStream: { declare var ReadableStream: {
prototype: ReadableStream; prototype: ReadableStream;
new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number, size?: undefined }): ReadableStream<Uint8Array>;
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>; new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
}; };
interface ReadableStreamBYOBReader {
readonly closed: Promise<void>;
cancel(reason?: any): Promise<void>;
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
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> { interface ReadableStreamDefaultController<R = any> {
readonly desiredSize: number | null; readonly desiredSize: number | null;
close(): void; close(): void;
enqueue(chunk: R): void; enqueue(chunk: R): void;
error(error?: any): void; error(e?: any): void;
} }
declare var ReadableStreamDefaultController: { declare var ReadableStreamDefaultController: {
@ -12560,29 +12594,21 @@ declare var ReadableStreamDefaultController: {
new(): ReadableStreamDefaultController; new(): ReadableStreamDefaultController;
}; };
interface ReadableStreamDefaultReader<R = any> { interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
readonly closed: Promise<void>; read(): Promise<ReadableStreamDefaultReadResult<R>>;
cancel(reason?: any): Promise<void>;
read(): Promise<ReadableStreamReadResult<R>>;
releaseLock(): void; releaseLock(): void;
} }
declare var ReadableStreamDefaultReader: { declare var ReadableStreamDefaultReader: {
prototype: ReadableStreamDefaultReader; prototype: ReadableStreamDefaultReader;
new(): ReadableStreamDefaultReader; new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
}; };
interface ReadableStreamReader<R = any> { interface ReadableStreamGenericReader {
cancel(): Promise<void>; readonly closed: Promise<undefined>;
read(): Promise<ReadableStreamReadResult<R>>; cancel(reason?: any): Promise<void>;
releaseLock(): void;
} }
declare var ReadableStreamReader: {
prototype: ReadableStreamReader;
new(): ReadableStreamReader;
};
/** This Fetch API interface represents a resource request. */ /** This Fetch API interface represents a resource request. */
interface Request extends Body { interface Request extends Body {
/** /**
@ -12653,6 +12679,39 @@ declare var Request: {
new(input: RequestInfo, init?: RequestInit): Request; new(input: RequestInfo, init?: RequestInit): Request;
}; };
interface ResizeObserver {
disconnect(): void;
observe(target: Element, options?: ResizeObserverOptions): void;
unobserve(target: Element): void;
}
declare var ResizeObserver: {
prototype: ResizeObserver;
new(callback: ResizeObserverCallback): ResizeObserver;
};
interface ResizeObserverEntry {
readonly borderBoxSize: ReadonlyArray<ResizeObserverSize>;
readonly contentBoxSize: ReadonlyArray<ResizeObserverSize>;
readonly contentRect: DOMRectReadOnly;
readonly target: Element;
}
declare var ResizeObserverEntry: {
prototype: ResizeObserverEntry;
new(): ResizeObserverEntry;
};
interface ResizeObserverSize {
readonly blockSize: number;
readonly inlineSize: number;
}
declare var ResizeObserverSize: {
prototype: ResizeObserverSize;
new(): ResizeObserverSize;
};
/** This Fetch API interface represents the response to a request. */ /** This Fetch API interface represents the response to a request. */
interface Response extends Body { interface Response extends Body {
readonly headers: Headers; readonly headers: Headers;
@ -14477,7 +14536,7 @@ declare var SVGStringList: {
}; };
/** Corresponds to the SVG <style> element. */ /** Corresponds to the SVG <style> element. */
interface SVGStyleElement extends SVGElement { interface SVGStyleElement extends SVGElement, LinkStyle {
disabled: boolean; disabled: boolean;
media: string; media: string;
title: string; title: string;
@ -14831,7 +14890,9 @@ interface ScriptProcessorNodeEventMap {
"audioprocess": AudioProcessingEvent; "audioprocess": AudioProcessingEvent;
} }
/** Allows the generation, processing, or analyzing of audio using JavaScript. */ /** Allows the generation, processing, or analyzing of audio using JavaScript.
* @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and was replaced by AudioWorklet (see AudioWorkletNode).
*/
interface ScriptProcessorNode extends AudioNode { interface ScriptProcessorNode extends AudioNode {
/** @deprecated */ /** @deprecated */
readonly bufferSize: number; readonly bufferSize: number;
@ -14942,7 +15003,7 @@ interface ServiceWorkerContainer extends EventTarget {
readonly ready: Promise<ServiceWorkerRegistration>; readonly ready: Promise<ServiceWorkerRegistration>;
getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>; getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>;
getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>; getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
register(scriptURL: string, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>; register(scriptURL: string | URL, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
startMessages(): void; startMessages(): void;
addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@ -14955,7 +15016,9 @@ declare var ServiceWorkerContainer: {
new(): ServiceWorkerContainer; new(): ServiceWorkerContainer;
}; };
/** This ServiceWorker API interface contains information about an event sent to a ServiceWorkerContainer target. This extends the default message event to allow setting a ServiceWorker object as the source of a message. The event object is accessed via the handler function of a message event, when fired by a message received from a service worker. */ /** This ServiceWorker API interface contains information about an event sent to a ServiceWorkerContainer target. This extends the default message event to allow setting a ServiceWorker object as the source of a message. The event object is accessed via the handler function of a message event, when fired by a message received from a service worker.
* @deprecated In modern browsers, this interface has been deprecated. Service worker messages will now use the MessageEvent interface, for consistency with other web messaging features.
*/
interface ServiceWorkerMessageEvent extends Event { interface ServiceWorkerMessageEvent extends Event {
readonly data: any; readonly data: any;
readonly lastEventId: string; readonly lastEventId: string;
@ -15116,7 +15179,7 @@ interface SpeechRecognitionEventMap {
"audioend": Event; "audioend": Event;
"audiostart": Event; "audiostart": Event;
"end": Event; "end": Event;
"error": ErrorEvent; "error": SpeechRecognitionErrorEvent;
"nomatch": SpeechRecognitionEvent; "nomatch": SpeechRecognitionEvent;
"result": SpeechRecognitionEvent; "result": SpeechRecognitionEvent;
"soundend": Event; "soundend": Event;
@ -15135,7 +15198,7 @@ interface SpeechRecognition extends EventTarget {
onaudioend: ((this: SpeechRecognition, ev: Event) => any) | null; onaudioend: ((this: SpeechRecognition, ev: Event) => any) | null;
onaudiostart: ((this: SpeechRecognition, ev: Event) => any) | null; onaudiostart: ((this: SpeechRecognition, ev: Event) => any) | null;
onend: ((this: SpeechRecognition, ev: Event) => any) | null; onend: ((this: SpeechRecognition, ev: Event) => any) | null;
onerror: ((this: SpeechRecognition, ev: ErrorEvent) => any) | null; onerror: ((this: SpeechRecognition, ev: SpeechRecognitionErrorEvent) => any) | null;
onnomatch: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null; onnomatch: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null; onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
onsoundend: ((this: SpeechRecognition, ev: Event) => any) | null; onsoundend: ((this: SpeechRecognition, ev: Event) => any) | null;
@ -15167,6 +15230,16 @@ declare var SpeechRecognitionAlternative: {
new(): SpeechRecognitionAlternative; new(): SpeechRecognitionAlternative;
}; };
interface SpeechRecognitionErrorEvent extends Event {
readonly error: SpeechRecognitionErrorCode;
readonly message: string;
}
declare var SpeechRecognitionErrorEvent: {
prototype: SpeechRecognitionErrorEvent;
new(type: string, eventInitDict: SpeechRecognitionErrorEventInit): SpeechRecognitionErrorEvent;
};
interface SpeechRecognitionEvent extends Event { interface SpeechRecognitionEvent extends Event {
readonly resultIndex: number; readonly resultIndex: number;
readonly results: SpeechRecognitionResultList; readonly results: SpeechRecognitionResultList;
@ -15174,7 +15247,7 @@ interface SpeechRecognitionEvent extends Event {
declare var SpeechRecognitionEvent: { declare var SpeechRecognitionEvent: {
prototype: SpeechRecognitionEvent; prototype: SpeechRecognitionEvent;
new(): SpeechRecognitionEvent; new(type: string, eventInitDict: SpeechRecognitionEventInit): SpeechRecognitionEvent;
}; };
interface SpeechRecognitionResult { interface SpeechRecognitionResult {
@ -15490,14 +15563,14 @@ declare var Text: {
/** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView a C-like representation of strings based on typed arrays. */ /** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView a C-like representation of strings based on typed arrays. */
interface TextDecoder extends TextDecoderCommon { interface TextDecoder extends TextDecoderCommon {
/** /**
* Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented stream. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments. * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
* *
* ``` * ```
* var string = "", decoder = new TextDecoder(encoding), buffer; * var string = "", decoder = new TextDecoder(encoding), buffer;
* while(buffer = next_chunk()) { * while(buffer = next_chunk()) {
* string += decoder.decode(buffer, {stream:true}); * string += decoder.decode(buffer, {stream:true});
* } * }
* string += decoder.decode(); // end-of-stream * string += decoder.decode(); // end-of-queue
* ``` * ```
* *
* If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError. * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
@ -15516,11 +15589,11 @@ interface TextDecoderCommon {
*/ */
readonly encoding: string; readonly encoding: string;
/** /**
* Returns true if error mode is "fatal", and false otherwise. * Returns true if error mode is "fatal", otherwise false.
*/ */
readonly fatal: boolean; readonly fatal: boolean;
/** /**
* Returns true if ignore BOM flag is set, and false otherwise. * Returns the value of ignore BOM.
*/ */
readonly ignoreBOM: boolean; readonly ignoreBOM: boolean;
} }
@ -15542,7 +15615,7 @@ interface TextEncoder extends TextEncoderCommon {
*/ */
encode(input?: string): Uint8Array; encode(input?: string): Uint8Array;
/** /**
* Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as a dictionary whereby read is the number of converted code units of source and written is the number of bytes modified in destination. * Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as an object wherein read is the number of converted code units of source and written is the number of bytes modified in destination.
*/ */
encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult; encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
} }
@ -18397,6 +18470,8 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
"ended": Event; "ended": Event;
"error": ErrorEvent; "error": ErrorEvent;
"focus": FocusEvent; "focus": FocusEvent;
"gamepadconnected": GamepadEvent;
"gamepaddisconnected": GamepadEvent;
"hashchange": HashChangeEvent; "hashchange": HashChangeEvent;
"input": Event; "input": Event;
"invalid": Event; "invalid": Event;
@ -18482,7 +18557,7 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler
readonly event: Event | undefined; readonly event: Event | undefined;
/** @deprecated */ /** @deprecated */
readonly external: External; readonly external: External;
readonly frameElement: Element; readonly frameElement: Element | null;
readonly frames: Window; readonly frames: Window;
readonly history: History; readonly history: History;
readonly innerHeight: number; readonly innerHeight: number;
@ -18500,6 +18575,8 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler
ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null; ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null;
ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null; ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null; ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
ongamepadconnected: ((this: Window, ev: GamepadEvent) => any) | null;
ongamepaddisconnected: ((this: Window, ev: GamepadEvent) => any) | null;
onmousewheel: ((this: Window, ev: Event) => any) | null; onmousewheel: ((this: Window, ev: Event) => any) | null;
onmsgesturechange: ((this: Window, ev: Event) => any) | null; onmsgesturechange: ((this: Window, ev: Event) => any) | null;
onmsgesturedoubletap: ((this: Window, ev: Event) => any) | null; onmsgesturedoubletap: ((this: Window, ev: Event) => any) | null;
@ -18721,7 +18798,7 @@ declare var WritableStream: {
/** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */ /** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
interface WritableStreamDefaultController { interface WritableStreamDefaultController {
error(error?: any): void; error(e?: any): void;
} }
declare var WritableStreamDefaultController: { declare var WritableStreamDefaultController: {
@ -18731,9 +18808,9 @@ declare var 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. */ /** 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> { interface WritableStreamDefaultWriter<W = any> {
readonly closed: Promise<void>; readonly closed: Promise<undefined>;
readonly desiredSize: number | null; readonly desiredSize: number | null;
readonly ready: Promise<void>; readonly ready: Promise<undefined>;
abort(reason?: any): Promise<void>; abort(reason?: any): Promise<void>;
close(): Promise<void>; close(): Promise<void>;
releaseLock(): void; releaseLock(): void;
@ -18742,7 +18819,7 @@ interface WritableStreamDefaultWriter<W = any> {
declare var WritableStreamDefaultWriter: { declare var WritableStreamDefaultWriter: {
prototype: WritableStreamDefaultWriter; prototype: WritableStreamDefaultWriter;
new(): WritableStreamDefaultWriter; new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
}; };
/** 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. */ /** 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. */
@ -19254,7 +19331,7 @@ interface PositionErrorCallback {
(positionError: GeolocationPositionError): void; (positionError: GeolocationPositionError): void;
} }
interface QueuingStrategySizeCallback<T = any> { interface QueuingStrategySize<T = any> {
(chunk: T): number; (chunk: T): number;
} }
@ -19270,46 +19347,54 @@ interface RTCStatsCallback {
(report: RTCStatsReport): void; (report: RTCStatsReport): void;
} }
interface ReadableByteStreamControllerCallback { interface ResizeObserverCallback {
(controller: ReadableByteStreamController): void | PromiseLike<void>; (entries: ResizeObserverEntry[], observer: ResizeObserver): void;
} }
interface ReadableStreamDefaultControllerCallback<R> { interface TransformerFlushCallback<O> {
(controller: ReadableStreamDefaultController<R>): void | PromiseLike<void>;
}
interface ReadableStreamErrorCallback {
(reason: any): void | PromiseLike<void>;
}
interface TransformStreamDefaultControllerCallback<O> {
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>; (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
} }
interface TransformStreamDefaultControllerTransformCallback<I, O> { interface TransformerStartCallback<O> {
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
}
interface TransformerTransformCallback<I, O> {
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>; (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
} }
interface UnderlyingSinkAbortCallback {
(reason: any): void | PromiseLike<void>;
}
interface UnderlyingSinkCloseCallback {
(): void | PromiseLike<void>;
}
interface UnderlyingSinkStartCallback {
(controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
interface UnderlyingSinkWriteCallback<W> {
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
interface UnderlyingSourceCancelCallback {
(reason: any): void | PromiseLike<void>;
}
interface UnderlyingSourcePullCallback<R> {
(controller: ReadableStreamController<R>): void | PromiseLike<void>;
}
interface UnderlyingSourceStartCallback<R> {
(controller: ReadableStreamController<R>): void | PromiseLike<void>;
}
interface VoidFunction { interface VoidFunction {
(): void; (): void;
} }
interface WritableStreamDefaultControllerCloseCallback {
(): void | PromiseLike<void>;
}
interface WritableStreamDefaultControllerStartCallback {
(controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
interface WritableStreamDefaultControllerWriteCallback<W> {
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
interface WritableStreamErrorCallback {
(reason: any): void | PromiseLike<void>;
}
interface HTMLElementTagNameMap { interface HTMLElementTagNameMap {
"a": HTMLAnchorElement; "a": HTMLAnchorElement;
"abbr": HTMLElement; "abbr": HTMLElement;
@ -19521,7 +19606,7 @@ declare var document: Document;
declare var event: Event | undefined; declare var event: Event | undefined;
/** @deprecated */ /** @deprecated */
declare var external: External; declare var external: External;
declare var frameElement: Element; declare var frameElement: Element | null;
declare var frames: Window; declare var frames: Window;
declare var history: History; declare var history: History;
declare var innerHeight: number; declare var innerHeight: number;
@ -19540,6 +19625,8 @@ declare var ondevicelight: ((this: Window, ev: DeviceLightEvent) => any) | null;
declare var ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null; declare var ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null;
declare var ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null; declare var ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
declare var ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null; declare var ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
declare var ongamepadconnected: ((this: Window, ev: GamepadEvent) => any) | null;
declare var ongamepaddisconnected: ((this: Window, ev: GamepadEvent) => any) | null;
declare var onmousewheel: ((this: Window, ev: Event) => any) | null; declare var onmousewheel: ((this: Window, ev: Event) => any) | null;
declare var onmsgesturechange: ((this: Window, ev: Event) => any) | null; declare var onmsgesturechange: ((this: Window, ev: Event) => any) | null;
declare var onmsgesturedoubletap: ((this: Window, ev: Event) => any) | null; declare var onmsgesturedoubletap: ((this: Window, ev: Event) => any) | null;
@ -19959,7 +20046,8 @@ type ConstrainDouble = number | ConstrainDoubleRange;
type ConstrainBoolean = boolean | ConstrainBooleanParameters; type ConstrainBoolean = boolean | ConstrainBooleanParameters;
type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters; type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
type PerformanceEntryList = PerformanceEntry[]; type PerformanceEntryList = PerformanceEntry[];
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>; type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
type VibratePattern = number | number[]; type VibratePattern = number | number[];
type COSEAlgorithmIdentifier = number; type COSEAlgorithmIdentifier = number;
type UvmEntry = number[]; type UvmEntry = number[];
@ -19998,6 +20086,7 @@ type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
/** @deprecated */ /** @deprecated */
type MouseWheelEvent = WheelEvent; type MouseWheelEvent = WheelEvent;
type WindowProxy = Window; type WindowProxy = Window;
type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
type AlignSetting = "center" | "end" | "left" | "right" | "start"; type AlignSetting = "center" | "end" | "left" | "right" | "start";
type AnimationPlayState = "finished" | "idle" | "paused" | "running"; type AnimationPlayState = "finished" | "idle" | "paused" | "running";
type AppendMode = "segments" | "sequence"; type AppendMode = "segments" | "sequence";
@ -20069,7 +20158,7 @@ type OverSampleType = "2x" | "4x" | "none";
type PanningModelType = "HRTF" | "equalpower"; type PanningModelType = "HRTF" | "equalpower";
type PaymentComplete = "fail" | "success" | "unknown"; type PaymentComplete = "fail" | "success" | "unknown";
type PaymentShippingType = "delivery" | "pickup" | "shipping"; type PaymentShippingType = "delivery" | "pickup" | "shipping";
type PermissionName = "accelerometer" | "ambient-light-sensor" | "background-sync" | "bluetooth" | "camera" | "clipboard" | "device-info" | "geolocation" | "gyroscope" | "magnetometer" | "microphone" | "midi" | "notifications" | "persistent-storage" | "push" | "speaker"; type PermissionName = "accelerometer" | "ambient-light-sensor" | "background-fetch" | "background-sync" | "bluetooth" | "camera" | "clipboard-read" | "clipboard-write" | "device-info" | "display-capture" | "geolocation" | "gyroscope" | "magnetometer" | "microphone" | "midi" | "nfc" | "notifications" | "persistent-storage" | "push" | "speaker";
type PermissionState = "denied" | "granted" | "prompt"; type PermissionState = "denied" | "granted" | "prompt";
type PlaybackDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; type PlaybackDirection = "alternate" | "alternate-reverse" | "normal" | "reverse";
type PositionAlignSetting = "auto" | "center" | "line-left" | "line-right"; type PositionAlignSetting = "auto" | "center" | "line-left" | "line-right";
@ -20103,9 +20192,9 @@ type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendre
type RTCSctpTransportState = "closed" | "connected" | "connecting"; type RTCSctpTransportState = "closed" | "connected" | "connecting";
type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback"; type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback";
type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable"; type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable";
type RTCStatsIceCandidatePairState = "cancelled" | "failed" | "frozen" | "inprogress" | "succeeded" | "waiting"; type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "succeeded" | "waiting";
type RTCStatsIceCandidateType = "host" | "peerreflexive" | "relayed" | "serverreflexive"; type RTCStatsIceCandidateType = "host" | "peerreflexive" | "relayed" | "serverreflexive";
type RTCStatsType = "candidatepair" | "datachannel" | "inboundrtp" | "localcandidate" | "outboundrtp" | "remotecandidate" | "session" | "track" | "transport"; type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "csrc" | "data-channel" | "ice-server" | "inbound-rtp" | "local-candidate" | "media-source" | "outbound-rtp" | "peer-connection" | "receiver" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "sctp-transport" | "sender" | "stream" | "track" | "transceiver" | "transport";
type ReadyState = "closed" | "ended" | "open"; type ReadyState = "closed" | "ended" | "open";
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url"; type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload"; type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
@ -20114,6 +20203,7 @@ type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" |
type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin"; type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
type RequestRedirect = "error" | "follow" | "manual"; type RequestRedirect = "error" | "follow" | "manual";
type ResidentKeyRequirement = "discouraged" | "preferred" | "required"; type ResidentKeyRequirement = "discouraged" | "preferred" | "required";
type ResizeObserverBoxOptions = "border-box" | "content-box" | "device-pixel-content-box";
type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResizeQuality = "high" | "low" | "medium" | "pixelated";
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
type ScopedCredentialType = "ScopedCred"; type ScopedCredentialType = "ScopedCred";
@ -20125,6 +20215,7 @@ type SelectionMode = "end" | "preserve" | "select" | "start";
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
type ShadowRootMode = "closed" | "open"; type ShadowRootMode = "closed" | "open";
type SpeechRecognitionErrorCode = "aborted" | "audio-capture" | "bad-grammar" | "language-not-supported" | "network" | "no-speech" | "not-allowed" | "service-not-allowed";
type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "not-allowed" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable"; type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "not-allowed" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable";
type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles"; type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles";
type TextTrackMode = "disabled" | "hidden" | "showing"; type TextTrackMode = "disabled" | "hidden" | "showing";

View file

@ -19,19 +19,19 @@ and limitations under the License.
interface ProxyHandler<T extends object> { interface ProxyHandler<T extends object> {
getPrototypeOf? (target: T): object | null; apply?(target: T, thisArg: any, argArray: any[]): any;
setPrototypeOf? (target: T, v: any): boolean; construct?(target: T, argArray: any[], newTarget: Function): object;
isExtensible? (target: T): boolean; defineProperty?(target: T, p: string | symbol, attributes: PropertyDescriptor): boolean;
preventExtensions? (target: T): boolean; deleteProperty?(target: T, p: string | symbol): boolean;
getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor | undefined; get?(target: T, p: string | symbol, receiver: any): any;
has? (target: T, p: PropertyKey): boolean; getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined;
get? (target: T, p: PropertyKey, receiver: any): any; getPrototypeOf?(target: T): object | null;
set? (target: T, p: PropertyKey, value: any, receiver: any): boolean; has?(target: T, p: string | symbol): boolean;
deleteProperty? (target: T, p: PropertyKey): boolean; isExtensible?(target: T): boolean;
defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean; ownKeys?(target: T): ArrayLike<string | symbol>;
ownKeys? (target: T): PropertyKey[]; preventExtensions?(target: T): boolean;
apply? (target: T, thisArg: any, argArray?: any): any; set?(target: T, p: string | symbol, value: any, receiver: any): boolean;
construct? (target: T, argArray: any, newTarget?: any): object; setPrototypeOf?(target: T, v: object | null): boolean;
} }
interface ProxyConstructor { interface ProxyConstructor {

View file

@ -19,17 +19,105 @@ and limitations under the License.
declare namespace Reflect { declare namespace Reflect {
/**
* Calls the function with the specified object as the this value
* and the elements of specified array as the arguments.
* @param target The function to call.
* @param thisArgument The object to be used as the this object.
* @param argumentsList An array of argument values to be passed to the function.
*/
function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any; function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
/**
* Constructs the target with the elements of specified array as the arguments
* and the specified constructor as the `new.target` value.
* @param target The constructor to invoke.
* @param argumentsList An array of argument values to be passed to the constructor.
* @param newTarget The constructor to be used as the `new.target` object.
*/
function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: Function): any;
/**
* Adds a property to an object, or modifies attributes of an existing property.
* @param target Object on which to add or modify the property. This can be a native JavaScript object
* (that is, a user-defined object or a built in object) or a DOM object.
* @param propertyKey The property name.
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
*/
function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
/**
* Removes a property from an object, equivalent to `delete target[propertyKey]`,
* except it won't throw if `target[propertyKey]` is non-configurable.
* @param target Object from which to remove the own property.
* @param propertyKey The property name.
*/
function deleteProperty(target: object, propertyKey: PropertyKey): boolean; function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
/**
* Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`.
* @param target Object that contains the property on itself or in its prototype chain.
* @param propertyKey The property name.
* @param receiver The reference to use as the `this` value in the getter function,
* if `target[propertyKey]` is an accessor property.
*/
function get(target: object, propertyKey: PropertyKey, receiver?: any): any; function get(target: object, propertyKey: PropertyKey, receiver?: any): any;
/**
* Gets the own property descriptor of the specified object.
* An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
* @param target Object that contains the property.
* @param propertyKey The property name.
*/
function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor | undefined; function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor | undefined;
function getPrototypeOf(target: object): object;
/**
* Returns the prototype of an object.
* @param target The object that references the prototype.
*/
function getPrototypeOf(target: object): object | null;
/**
* Equivalent to `propertyKey in target`.
* @param target Object that contains the property on itself or in its prototype chain.
* @param propertyKey Name of the property.
*/
function has(target: object, propertyKey: PropertyKey): boolean; function has(target: object, propertyKey: PropertyKey): boolean;
/**
* Returns a value that indicates whether new properties can be added to an object.
* @param target Object to test.
*/
function isExtensible(target: object): boolean; function isExtensible(target: object): boolean;
function ownKeys(target: object): PropertyKey[];
/**
* Returns the string and symbol keys of the own properties of an object. The own properties of an object
* are those that are defined directly on that object, and are not inherited from the object's prototype.
* @param target Object that contains the own properties.
*/
function ownKeys(target: object): (string | symbol)[];
/**
* Prevents the addition of new properties to an object.
* @param target Object to make non-extensible.
* @return Whether the object has been made non-extensible.
*/
function preventExtensions(target: object): boolean; function preventExtensions(target: object): boolean;
/**
* Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`.
* @param target Object that contains the property on itself or in its prototype chain.
* @param propertyKey Name of the property.
* @param receiver The reference to use as the `this` value in the setter function,
* if `target[propertyKey]` is an accessor property.
*/
function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
function setPrototypeOf(target: object, proto: any): boolean;
/**
* Sets the prototype of a specified object o to object proto or null.
* @param target The object to change its prototype.
* @param proto The value of the new prototype or null.
* @return Whether setting the prototype was successful.
*/
function setPrototypeOf(target: object, proto: object | null): boolean;
} }

View file

@ -297,4 +297,14 @@ declare namespace Intl {
unit?: string; unit?: string;
unitDisplay?: string; unitDisplay?: string;
} }
interface DateTimeFormatOptions {
dateStyle?: "full" | "long" | "medium" | "short";
timeStyle?: "full" | "long" | "medium" | "short";
calendar?: string;
dayPeriod?: "narrow" | "short" | "long";
numberingSystem?: string;
hourCycle?: "h11" | "h12" | "h23" | "h24";
fractionalSecondDigits?: 0 | 1 | 2 | 3;
}
} }

68
cli/dts/lib.es5.d.ts vendored
View file

@ -1219,7 +1219,7 @@ interface ConcatArray<T> {
interface Array<T> { interface Array<T> {
/** /**
* Gets or sets the length of the array. This is a number one higher than the highest element defined in an array. * Gets or sets the length of the array. This is a number one higher than the highest index in the array.
*/ */
length: number; length: number;
/** /**
@ -1232,44 +1232,54 @@ interface Array<T> {
toLocaleString(): string; toLocaleString(): string;
/** /**
* Removes the last element from an array and returns it. * Removes the last element from an array and returns it.
* If the array is empty, undefined is returned and the array is not modified.
*/ */
pop(): T | undefined; pop(): T | undefined;
/** /**
* Appends new elements to an array, and returns the new length of the array. * Appends new elements to the end of an array, and returns the new length of the array.
* @param items New elements of the Array. * @param items New elements to add to the array.
*/ */
push(...items: T[]): number; push(...items: T[]): number;
/** /**
* Combines two or more arrays. * Combines two or more arrays.
* @param items Additional items to add to the end of array1. * This method returns a new array without modifying any existing arrays.
* @param items Additional arrays and/or items to add to the end of the array.
*/ */
concat(...items: ConcatArray<T>[]): T[]; concat(...items: ConcatArray<T>[]): T[];
/** /**
* Combines two or more arrays. * Combines two or more arrays.
* @param items Additional items to add to the end of array1. * This method returns a new array without modifying any existing arrays.
* @param items Additional arrays and/or items to add to the end of the array.
*/ */
concat(...items: (T | ConcatArray<T>)[]): T[]; concat(...items: (T | ConcatArray<T>)[]): T[];
/** /**
* Adds all the elements of an array separated by the specified separator string. * Adds all the elements of an array into a string, separated by the specified separator string.
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.
*/ */
join(separator?: string): string; join(separator?: string): string;
/** /**
* Reverses the elements in an Array. * Reverses the elements in an array in place.
* This method mutates the array and returns a reference to the same array.
*/ */
reverse(): T[]; reverse(): T[];
/** /**
* Removes the first element from an array and returns it. * Removes the first element from an array and returns it.
* If the array is empty, undefined is returned and the array is not modified.
*/ */
shift(): T | undefined; shift(): T | undefined;
/** /**
* Returns a section of an array. * Returns a copy of a section of an array.
* @param start The beginning of the specified portion of the array. * For both start and end, a negative index can be used to indicate an offset from the end of the array.
* @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. * For example, -2 refers to the second to last element of the array.
* @param start The beginning index of the specified portion of the array.
* If start is undefined, then the slice begins at index 0.
* @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.
* If end is undefined, then the slice extends to the end of the array.
*/ */
slice(start?: number, end?: number): T[]; slice(start?: number, end?: number): T[];
/** /**
* Sorts an array. * Sorts an array in place.
* This method mutates the array and returns a reference to the same array.
* @param compareFn Function used to determine the order of the elements. It is expected to return * @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive * a negative value if first argument is less than second argument, zero if they're equal and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
@ -1282,6 +1292,7 @@ interface Array<T> {
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
* @param start The zero-based location in the array from which to start removing elements. * @param start The zero-based location in the array from which to start removing elements.
* @param deleteCount The number of elements to remove. * @param deleteCount The number of elements to remove.
* @returns An array containing the elements that were deleted.
*/ */
splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount?: number): T[];
/** /**
@ -1289,23 +1300,24 @@ interface Array<T> {
* @param start The zero-based location in the array from which to start removing elements. * @param start The zero-based location in the array from which to start removing elements.
* @param deleteCount The number of elements to remove. * @param deleteCount The number of elements to remove.
* @param items Elements to insert into the array in place of the deleted elements. * @param items Elements to insert into the array in place of the deleted elements.
* @returns An array containing the elements that were deleted.
*/ */
splice(start: number, deleteCount: number, ...items: T[]): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[];
/** /**
* Inserts new elements at the start of an array. * Inserts new elements at the start of an array, and returns the new length of the array.
* @param items Elements to insert at the start of the Array. * @param items Elements to insert at the start of the array.
*/ */
unshift(...items: T[]): number; unshift(...items: T[]): number;
/** /**
* Returns the index of the first occurrence of a value in an array. * Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array. * @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
*/ */
indexOf(searchElement: T, fromIndex?: number): number; indexOf(searchElement: T, fromIndex?: number): number;
/** /**
* Returns the index of the last occurrence of a specified value in an array. * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
* @param searchElement The value to locate in the array. * @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.
*/ */
lastIndexOf(searchElement: T, fromIndex?: number): number; lastIndexOf(searchElement: T, fromIndex?: number): number;
/** /**
@ -4338,17 +4350,17 @@ declare namespace Intl {
}; };
interface DateTimeFormatOptions { interface DateTimeFormatOptions {
localeMatcher?: string; localeMatcher?: "best fit" | "lookup";
weekday?: string; weekday?: "long" | "short" | "narrow";
era?: string; era?: "long" | "short" | "narrow";
year?: string; year?: "numeric" | "2-digit";
month?: string; month?: "numeric" | "2-digit" | "long" | "short" | "narrow";
day?: string; day?: "numeric" | "2-digit";
hour?: string; hour?: "numeric" | "2-digit";
minute?: string; minute?: "numeric" | "2-digit";
second?: string; second?: "numeric" | "2-digit";
timeZoneName?: string; timeZoneName?: "long" | "short";
formatMatcher?: string; formatMatcher?: "best fit" | "basic";
hour12?: boolean; hour12?: boolean;
timeZone?: string; timeZone?: string;
} }

View file

@ -19,7 +19,7 @@ and limitations under the License.
declare namespace Intl { declare namespace Intl {
type NumberFormatPartTypes = "currency" | "decimal" | "fraction" | "group" | "infinity" | "integer" | "literal" | "minusSign" | "nan" | "plusSign" | "percentSign"; type NumberFormatPartTypes = "compact" | "currency" | "decimal" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "fraction" | "group" | "infinity" | "integer" | "literal" | "minusSign" | "nan" | "plusSign" | "percentSign" | "unit" | "unknown";
interface NumberFormatPart { interface NumberFormatPart {
type: NumberFormatPartTypes; type: NumberFormatPartTypes;

View file

@ -263,6 +263,10 @@ interface ImageEncodeOptions {
type?: string; type?: string;
} }
interface ImportMeta {
url: string;
}
interface JsonWebKey { interface JsonWebKey {
alg?: string; alg?: string;
crv?: string; crv?: string;
@ -354,13 +358,6 @@ interface PermissionDescriptor {
name: PermissionName; name: PermissionName;
} }
interface PipeOptions {
preventAbort?: boolean;
preventCancel?: boolean;
preventClose?: boolean;
signal?: AbortSignal;
}
interface PostMessageOptions { interface PostMessageOptions {
transfer?: any[]; transfer?: any[];
} }
@ -403,19 +400,38 @@ interface PushSubscriptionOptionsInit {
interface QueuingStrategy<T = any> { interface QueuingStrategy<T = any> {
highWaterMark?: number; highWaterMark?: number;
size?: QueuingStrategySizeCallback<T>; size?: QueuingStrategySize<T>;
} }
interface ReadableStreamReadDoneResult<T> { interface QueuingStrategyInit {
/**
* Creates a new ByteLengthQueuingStrategy with the provided high water mark.
*
* Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.
*/
highWaterMark: number;
}
interface ReadableStreamDefaultReadDoneResult {
done: true; done: true;
value?: T; value?: undefined;
} }
interface ReadableStreamReadValueResult<T> { interface ReadableStreamDefaultReadValueResult<T> {
done: false; done: false;
value: T; value: T;
} }
interface ReadableWritablePair<R = any, W = any> {
readable: ReadableStream<R>;
/**
* Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
*
* Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
*/
writable: WritableStream<W>;
}
interface RegistrationOptions { interface RegistrationOptions {
scope?: string; scope?: string;
type?: WorkerType; type?: WorkerType;
@ -515,6 +531,30 @@ interface StorageEstimate {
usage?: number; usage?: number;
} }
interface StreamPipeOptions {
preventAbort?: boolean;
preventCancel?: boolean;
/**
* Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
*
* Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
*
* Errors and closures of the source and destination streams propagate as follows:
*
* An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.
*
* An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.
*
* When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.
*
* If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.
*
* The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.
*/
preventClose?: boolean;
signal?: AbortSignal;
}
interface SyncEventInit extends ExtendableEventInit { interface SyncEventInit extends ExtendableEventInit {
lastChance?: boolean; lastChance?: boolean;
tag: string; tag: string;
@ -535,33 +575,25 @@ interface TextEncoderEncodeIntoResult {
} }
interface Transformer<I = any, O = any> { interface Transformer<I = any, O = any> {
flush?: TransformStreamDefaultControllerCallback<O>; flush?: TransformerFlushCallback<O>;
readableType?: undefined; readableType?: undefined;
start?: TransformStreamDefaultControllerCallback<O>; start?: TransformerStartCallback<O>;
transform?: TransformStreamDefaultControllerTransformCallback<I, O>; transform?: TransformerTransformCallback<I, O>;
writableType?: undefined; writableType?: undefined;
} }
interface UnderlyingByteSource {
autoAllocateChunkSize?: number;
cancel?: ReadableStreamErrorCallback;
pull?: ReadableByteStreamControllerCallback;
start?: ReadableByteStreamControllerCallback;
type: "bytes";
}
interface UnderlyingSink<W = any> { interface UnderlyingSink<W = any> {
abort?: WritableStreamErrorCallback; abort?: UnderlyingSinkAbortCallback;
close?: WritableStreamDefaultControllerCloseCallback; close?: UnderlyingSinkCloseCallback;
start?: WritableStreamDefaultControllerStartCallback; start?: UnderlyingSinkStartCallback;
type?: undefined; type?: undefined;
write?: WritableStreamDefaultControllerWriteCallback<W>; write?: UnderlyingSinkWriteCallback<W>;
} }
interface UnderlyingSource<R = any> { interface UnderlyingSource<R = any> {
cancel?: ReadableStreamErrorCallback; cancel?: UnderlyingSourceCancelCallback;
pull?: ReadableStreamDefaultControllerCallback<R>; pull?: UnderlyingSourcePullCallback<R>;
start?: ReadableStreamDefaultControllerCallback<R>; start?: UnderlyingSourceStartCallback<R>;
type?: undefined; type?: undefined;
} }
@ -721,13 +753,13 @@ declare var BroadcastChannel: {
/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> { interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
highWaterMark: number; readonly highWaterMark: number;
size(chunk: ArrayBufferView): number; readonly size: QueuingStrategySize<ArrayBufferView>;
} }
declare var ByteLengthQueuingStrategy: { declare var ByteLengthQueuingStrategy: {
prototype: ByteLengthQueuingStrategy; prototype: ByteLengthQueuingStrategy;
new(options: { highWaterMark: number }): ByteLengthQueuingStrategy; new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
}; };
/** Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. */ /** Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. */
@ -920,7 +952,7 @@ declare var Client: {
interface Clients { interface Clients {
claim(): Promise<void>; claim(): Promise<void>;
get(id: string): Promise<Client | undefined>; get(id: string): Promise<Client | undefined>;
matchAll(options?: ClientQueryOptions): Promise<ReadonlyArray<Client>>; matchAll<T extends ClientQueryOptions>(options?: T): Promise<ReadonlyArray<T["type"] extends "window" ? WindowClient : Client>>;
openWindow(url: string): Promise<WindowClient | null>; openWindow(url: string): Promise<WindowClient | null>;
} }
@ -961,13 +993,13 @@ interface ConcatParams extends Algorithm {
/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
interface CountQueuingStrategy extends QueuingStrategy { interface CountQueuingStrategy extends QueuingStrategy {
highWaterMark: number; readonly highWaterMark: number;
size(chunk: any): 1; readonly size: QueuingStrategySize;
} }
declare var CountQueuingStrategy: { declare var CountQueuingStrategy: {
prototype: CountQueuingStrategy; prototype: CountQueuingStrategy;
new(options: { highWaterMark: number }): CountQueuingStrategy; new(init: QueuingStrategyInit): CountQueuingStrategy;
}; };
/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */ /** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
@ -1644,24 +1676,7 @@ declare var FormData: {
}; };
interface GenericTransformStream { interface GenericTransformStream {
/**
* Returns a readable stream whose chunks are strings resulting from running encoding's decoder on the chunks written to writable.
*/
readonly readable: ReadableStream; readonly readable: ReadableStream;
/**
* Returns a writable stream which accepts [AllowShared] BufferSource chunks and runs them through encoding's decoder before making them available to readable.
*
* Typically this will be used via the pipeThrough() method on a ReadableStream source.
*
* ```
* var decoder = new TextDecoderStream(encoding);
* byteReadable
* .pipeThrough(decoder)
* .pipeTo(textWritable);
* ```
*
* If the error mode is "fatal" and encoding's decoder returns error, both readable and writable will be errored with a TypeError.
*/
readonly writable: WritableStream; readonly writable: WritableStream;
} }
@ -2727,64 +2742,26 @@ declare var PushSubscriptionOptions: {
new(): PushSubscriptionOptions; new(): PushSubscriptionOptions;
}; };
interface ReadableByteStreamController {
readonly byobRequest: ReadableStreamBYOBRequest | undefined;
readonly desiredSize: number | null;
close(): void;
enqueue(chunk: ArrayBufferView): void;
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. */ /** 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> { interface ReadableStream<R = any> {
readonly locked: boolean; readonly locked: boolean;
cancel(reason?: any): Promise<void>; cancel(reason?: any): Promise<void>;
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
getReader(): ReadableStreamDefaultReader<R>; getReader(): ReadableStreamDefaultReader<R>;
pipeThrough<T>({ writable, readable }: { writable: WritableStream<R>, readable: ReadableStream<T> }, options?: PipeOptions): ReadableStream<T>; pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>; pipeTo(dest: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>]; tee(): [ReadableStream<R>, ReadableStream<R>];
} }
declare var ReadableStream: { declare var ReadableStream: {
prototype: ReadableStream; prototype: ReadableStream;
new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number, size?: undefined }): ReadableStream<Uint8Array>;
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>; new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
}; };
interface ReadableStreamBYOBReader {
readonly closed: Promise<void>;
cancel(reason?: any): Promise<void>;
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
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> { interface ReadableStreamDefaultController<R = any> {
readonly desiredSize: number | null; readonly desiredSize: number | null;
close(): void; close(): void;
enqueue(chunk: R): void; enqueue(chunk: R): void;
error(error?: any): void; error(e?: any): void;
} }
declare var ReadableStreamDefaultController: { declare var ReadableStreamDefaultController: {
@ -2792,29 +2769,21 @@ declare var ReadableStreamDefaultController: {
new(): ReadableStreamDefaultController; new(): ReadableStreamDefaultController;
}; };
interface ReadableStreamDefaultReader<R = any> { interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
readonly closed: Promise<void>; read(): Promise<ReadableStreamDefaultReadResult<R>>;
cancel(reason?: any): Promise<void>;
read(): Promise<ReadableStreamReadResult<R>>;
releaseLock(): void; releaseLock(): void;
} }
declare var ReadableStreamDefaultReader: { declare var ReadableStreamDefaultReader: {
prototype: ReadableStreamDefaultReader; prototype: ReadableStreamDefaultReader;
new(): ReadableStreamDefaultReader; new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
}; };
interface ReadableStreamReader<R = any> { interface ReadableStreamGenericReader {
cancel(): Promise<void>; readonly closed: Promise<undefined>;
read(): Promise<ReadableStreamReadResult<R>>; cancel(reason?: any): Promise<void>;
releaseLock(): void;
} }
declare var ReadableStreamReader: {
prototype: ReadableStreamReader;
new(): ReadableStreamReader;
};
/** This Fetch API interface represents a resource request. */ /** This Fetch API interface represents a resource request. */
interface Request extends Body { interface Request extends Body {
/** /**
@ -2942,7 +2911,7 @@ interface ServiceWorkerContainer extends EventTarget {
readonly ready: Promise<ServiceWorkerRegistration>; readonly ready: Promise<ServiceWorkerRegistration>;
getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>; getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>;
getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>; getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
register(scriptURL: string, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>; register(scriptURL: string | URL, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
startMessages(): void; startMessages(): void;
addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@ -3128,14 +3097,14 @@ declare var SyncManager: {
/** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView a C-like representation of strings based on typed arrays. */ /** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView a C-like representation of strings based on typed arrays. */
interface TextDecoder extends TextDecoderCommon { interface TextDecoder extends TextDecoderCommon {
/** /**
* Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented stream. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments. * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
* *
* ``` * ```
* var string = "", decoder = new TextDecoder(encoding), buffer; * var string = "", decoder = new TextDecoder(encoding), buffer;
* while(buffer = next_chunk()) { * while(buffer = next_chunk()) {
* string += decoder.decode(buffer, {stream:true}); * string += decoder.decode(buffer, {stream:true});
* } * }
* string += decoder.decode(); // end-of-stream * string += decoder.decode(); // end-of-queue
* ``` * ```
* *
* If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError. * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
@ -3154,11 +3123,11 @@ interface TextDecoderCommon {
*/ */
readonly encoding: string; readonly encoding: string;
/** /**
* Returns true if error mode is "fatal", and false otherwise. * Returns true if error mode is "fatal", otherwise false.
*/ */
readonly fatal: boolean; readonly fatal: boolean;
/** /**
* Returns true if ignore BOM flag is set, and false otherwise. * Returns the value of ignore BOM.
*/ */
readonly ignoreBOM: boolean; readonly ignoreBOM: boolean;
} }
@ -3180,7 +3149,7 @@ interface TextEncoder extends TextEncoderCommon {
*/ */
encode(input?: string): Uint8Array; encode(input?: string): Uint8Array;
/** /**
* Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as a dictionary whereby read is the number of converted code units of source and written is the number of bytes modified in destination. * Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as an object wherein read is the number of converted code units of source and written is the number of bytes modified in destination.
*/ */
encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult; encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
} }
@ -5559,7 +5528,7 @@ declare var WritableStream: {
/** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */ /** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
interface WritableStreamDefaultController { interface WritableStreamDefaultController {
error(error?: any): void; error(e?: any): void;
} }
declare var WritableStreamDefaultController: { declare var WritableStreamDefaultController: {
@ -5569,9 +5538,9 @@ declare var 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. */ /** 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> { interface WritableStreamDefaultWriter<W = any> {
readonly closed: Promise<void>; readonly closed: Promise<undefined>;
readonly desiredSize: number | null; readonly desiredSize: number | null;
readonly ready: Promise<void>; readonly ready: Promise<undefined>;
abort(reason?: any): Promise<void>; abort(reason?: any): Promise<void>;
close(): Promise<void>; close(): Promise<void>;
releaseLock(): void; releaseLock(): void;
@ -5580,7 +5549,7 @@ interface WritableStreamDefaultWriter<W = any> {
declare var WritableStreamDefaultWriter: { declare var WritableStreamDefaultWriter: {
prototype: WritableStreamDefaultWriter; prototype: WritableStreamDefaultWriter;
new(): WritableStreamDefaultWriter; new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
}; };
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap { interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
@ -5876,50 +5845,54 @@ interface PerformanceObserverCallback {
(entries: PerformanceObserverEntryList, observer: PerformanceObserver): void; (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
} }
interface QueuingStrategySizeCallback<T = any> { interface QueuingStrategySize<T = any> {
(chunk: T): number; (chunk: T): number;
} }
interface ReadableByteStreamControllerCallback { interface TransformerFlushCallback<O> {
(controller: ReadableByteStreamController): void | PromiseLike<void>;
}
interface ReadableStreamDefaultControllerCallback<R> {
(controller: ReadableStreamDefaultController<R>): void | PromiseLike<void>;
}
interface ReadableStreamErrorCallback {
(reason: any): void | PromiseLike<void>;
}
interface TransformStreamDefaultControllerCallback<O> {
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>; (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
} }
interface TransformStreamDefaultControllerTransformCallback<I, O> { interface TransformerStartCallback<O> {
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
}
interface TransformerTransformCallback<I, O> {
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>; (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
} }
interface UnderlyingSinkAbortCallback {
(reason: any): void | PromiseLike<void>;
}
interface UnderlyingSinkCloseCallback {
(): void | PromiseLike<void>;
}
interface UnderlyingSinkStartCallback {
(controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
interface UnderlyingSinkWriteCallback<W> {
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
interface UnderlyingSourceCancelCallback {
(reason: any): void | PromiseLike<void>;
}
interface UnderlyingSourcePullCallback<R> {
(controller: ReadableStreamController<R>): void | PromiseLike<void>;
}
interface UnderlyingSourceStartCallback<R> {
(controller: ReadableStreamController<R>): void | PromiseLike<void>;
}
interface VoidFunction { interface VoidFunction {
(): void; (): void;
} }
interface WritableStreamDefaultControllerCloseCallback {
(): void | PromiseLike<void>;
}
interface WritableStreamDefaultControllerStartCallback {
(controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
interface WritableStreamDefaultControllerWriteCallback<W> {
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
interface WritableStreamErrorCallback {
(reason: any): void | PromiseLike<void>;
}
/** /**
* Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging.
*/ */
@ -5997,7 +5970,8 @@ type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
type TimerHandler = string | Function; type TimerHandler = string | Function;
type PerformanceEntryList = PerformanceEntry[]; type PerformanceEntryList = PerformanceEntry[];
type PushMessageDataInit = BufferSource | string; type PushMessageDataInit = BufferSource | string;
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>; type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
type VibratePattern = number | number[]; type VibratePattern = number | number[];
type AlgorithmIdentifier = string | Algorithm; type AlgorithmIdentifier = string | Algorithm;
type HashAlgorithmIdentifier = AlgorithmIdentifier; type HashAlgorithmIdentifier = AlgorithmIdentifier;
@ -6024,6 +5998,7 @@ type DOMTimeStamp = number;
type FormDataEntryValue = File | string; type FormDataEntryValue = File | string;
type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey; type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey;
type Transferable = ArrayBuffer | MessagePort | ImageBitmap | OffscreenCanvas; type Transferable = ArrayBuffer | MessagePort | ImageBitmap | OffscreenCanvas;
type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
type BinaryType = "arraybuffer" | "blob"; type BinaryType = "arraybuffer" | "blob";
type CanvasDirection = "inherit" | "ltr" | "rtl"; type CanvasDirection = "inherit" | "ltr" | "rtl";
type CanvasFillRule = "evenodd" | "nonzero"; type CanvasFillRule = "evenodd" | "nonzero";
@ -6046,7 +6021,7 @@ type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "u
type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationDirection = "auto" | "ltr" | "rtl";
type NotificationPermission = "default" | "denied" | "granted"; type NotificationPermission = "default" | "denied" | "granted";
type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2"; type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2";
type PermissionName = "accelerometer" | "ambient-light-sensor" | "background-sync" | "bluetooth" | "camera" | "clipboard" | "device-info" | "geolocation" | "gyroscope" | "magnetometer" | "microphone" | "midi" | "notifications" | "persistent-storage" | "push" | "speaker"; type PermissionName = "accelerometer" | "ambient-light-sensor" | "background-fetch" | "background-sync" | "bluetooth" | "camera" | "clipboard-read" | "clipboard-write" | "device-info" | "display-capture" | "geolocation" | "gyroscope" | "magnetometer" | "microphone" | "midi" | "nfc" | "notifications" | "persistent-storage" | "push" | "speaker";
type PermissionState = "denied" | "granted" | "prompt"; type PermissionState = "denied" | "granted" | "prompt";
type PremultiplyAlpha = "default" | "none" | "premultiply"; type PremultiplyAlpha = "default" | "none" | "premultiply";
type PushEncryptionKeyName = "auth" | "p256dh"; type PushEncryptionKeyName = "auth" | "p256dh";

View file

@ -14,7 +14,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
declare namespace ts { declare namespace ts {
const versionMajorMinor = "4.1"; const versionMajorMinor = "4.2";
/** The version of the TypeScript compiler release */ /** The version of the TypeScript compiler release */
const version: string; const version: string;
/** /**
@ -81,7 +81,7 @@ declare namespace ts {
value: T; value: T;
done?: false; done?: false;
} | { } | {
value: never; value: void;
done: true; done: true;
}; };
} }
@ -1598,6 +1598,7 @@ declare namespace ts {
readonly kind: SyntaxKind.ImportEqualsDeclaration; readonly kind: SyntaxKind.ImportEqualsDeclaration;
readonly parent: SourceFile | ModuleBlock; readonly parent: SourceFile | ModuleBlock;
readonly name: Identifier; readonly name: Identifier;
readonly isTypeOnly: boolean;
readonly moduleReference: ModuleReference; readonly moduleReference: ModuleReference;
} }
export interface ExternalModuleReference extends Node { export interface ExternalModuleReference extends Node {
@ -1668,7 +1669,7 @@ declare namespace ts {
readonly name: Identifier; readonly name: Identifier;
} }
export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
export type TypeOnlyCompatibleAliasDeclaration = ImportClause | NamespaceImport | ImportOrExportSpecifier; export type TypeOnlyCompatibleAliasDeclaration = ImportClause | ImportEqualsDeclaration | NamespaceImport | ImportOrExportSpecifier;
/** /**
* This is either an `export =` or an `export default` declaration. * This is either an `export =` or an `export default` declaration.
* Unless `isExportEquals` is set, this node was parsed as an `export default`. * Unless `isExportEquals` is set, this node was parsed as an `export default`.
@ -2590,7 +2591,10 @@ declare namespace ts {
Optional = 2, Optional = 2,
Rest = 4, Rest = 4,
Variadic = 8, Variadic = 8,
Variable = 12 Fixed = 3,
Variable = 12,
NonRequired = 14,
NonRest = 11
} }
export interface TupleType extends GenericType { export interface TupleType extends GenericType {
elementFlags: readonly ElementFlags[]; elementFlags: readonly ElementFlags[];
@ -2831,6 +2835,7 @@ declare namespace ts {
noUnusedLocals?: boolean; noUnusedLocals?: boolean;
noUnusedParameters?: boolean; noUnusedParameters?: boolean;
noImplicitUseStrict?: boolean; noImplicitUseStrict?: boolean;
noPropertyAccessFromIndexSignature?: boolean;
assumeChangesOnlyAffectDirectDependencies?: boolean; assumeChangesOnlyAffectDirectDependencies?: boolean;
noLib?: boolean; noLib?: boolean;
noResolve?: boolean; noResolve?: boolean;
@ -2879,6 +2884,8 @@ declare namespace ts {
watchDirectory?: WatchDirectoryKind; watchDirectory?: WatchDirectoryKind;
fallbackPolling?: PollingWatchKind; fallbackPolling?: PollingWatchKind;
synchronousWatchDirectory?: boolean; synchronousWatchDirectory?: boolean;
excludeDirectories?: string[];
excludeFiles?: string[];
[option: string]: CompilerOptionsValue | undefined; [option: string]: CompilerOptionsValue | undefined;
} }
export interface TypeAcquisition { export interface TypeAcquisition {
@ -2972,10 +2979,6 @@ declare namespace ts {
None = 0, None = 0,
Recursive = 1 Recursive = 1
} }
export interface ExpandResult {
fileNames: string[];
wildcardDirectories: MapLike<WatchDirectoryFlags>;
}
export interface CreateProgramOptions { export interface CreateProgramOptions {
rootNames: readonly string[]; rootNames: readonly string[];
options: CompilerOptions; options: CompilerOptions;
@ -3228,7 +3231,11 @@ declare namespace ts {
updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode; updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode; createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode;
updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): FunctionTypeNode; updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): FunctionTypeNode;
createConstructorTypeNode(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode;
/** @deprecated */
createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode;
updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode;
/** @deprecated */
updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode; updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode;
createTypeQueryNode(exprName: EntityName): TypeQueryNode; createTypeQueryNode(exprName: EntityName): TypeQueryNode;
updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode; updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode;
@ -3406,8 +3413,8 @@ declare namespace ts {
updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock; updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock;
createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration; createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration;
updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration; updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration;
createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration; createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration;
updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration; updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration;
createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
@ -3681,8 +3688,8 @@ declare namespace ts {
*/ */
export type Visitor = (node: Node) => VisitResult<Node>; export type Visitor = (node: Node) => VisitResult<Node>;
export interface NodeVisitor { export interface NodeVisitor {
<T extends Node>(nodes: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T; <T extends Node>(nodes: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T;
<T extends Node>(nodes: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined; <T extends Node>(nodes: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined;
} }
export interface NodesVisitor { export interface NodesVisitor {
<T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>; <T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
@ -3862,7 +3869,7 @@ declare namespace ts {
readonly includeCompletionsForModuleExports?: boolean; readonly includeCompletionsForModuleExports?: boolean;
readonly includeAutomaticOptionalChainCompletions?: boolean; readonly includeAutomaticOptionalChainCompletions?: boolean;
readonly includeCompletionsWithInsertText?: boolean; readonly includeCompletionsWithInsertText?: boolean;
readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative"; readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
readonly allowTextChangesInNewFiles?: boolean; readonly allowTextChangesInNewFiles?: boolean;
@ -3961,6 +3968,7 @@ declare namespace ts {
reScanJsxToken(): JsxTokenSyntaxKind; reScanJsxToken(): JsxTokenSyntaxKind;
reScanLessThanToken(): SyntaxKind; reScanLessThanToken(): SyntaxKind;
reScanQuestionToken(): SyntaxKind; reScanQuestionToken(): SyntaxKind;
reScanInvalidIdentifier(): SyntaxKind;
scanJsxToken(): JsxTokenSyntaxKind; scanJsxToken(): JsxTokenSyntaxKind;
scanJsDocToken(): JSDocSyntaxKind; scanJsDocToken(): JSDocSyntaxKind;
scan(): SyntaxKind; scan(): SyntaxKind;
@ -4504,6 +4512,7 @@ declare namespace ts {
function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag; function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag;
function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag; function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag;
function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag; function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag;
function isJSDocSeeTag(node: Node): node is JSDocSeeTag;
function isJSDocEnumTag(node: Node): node is JSDocEnumTag; function isJSDocEnumTag(node: Node): node is JSDocEnumTag;
function isJSDocParameterTag(node: Node): node is JSDocParameterTag; function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
function isJSDocReturnTag(node: Node): node is JSDocReturnTag; function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
@ -4683,7 +4692,7 @@ declare namespace ts {
* @param test A callback to execute to verify the Node is valid. * @param test A callback to execute to verify the Node is valid.
* @param lift An optional callback to execute to lift a NodeArray into a valid Node. * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
*/ */
function visitNode<T extends Node>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T; function visitNode<T extends Node>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T;
/** /**
* Visits a Node using the supplied visitor, possibly returning a new Node in its place. * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
* *
@ -4692,7 +4701,7 @@ declare namespace ts {
* @param test A callback to execute to verify the Node is valid. * @param test A callback to execute to verify the Node is valid.
* @param lift An optional callback to execute to lift a NodeArray into a valid Node. * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
*/ */
function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined; function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined;
/** /**
* Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
* *
@ -5530,6 +5539,7 @@ declare namespace ts {
getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined; getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined;
findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined; findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined;
getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined; getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined;
getFileReferences(fileName: string): ReferenceEntry[];
/** @deprecated */ /** @deprecated */
getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined; getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined;
getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[]; getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[];
@ -5545,7 +5555,7 @@ declare namespace ts {
getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion | undefined; getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions): TextInsertion | undefined;
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean; isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
/** /**
* This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag. * This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag.
@ -5565,7 +5575,7 @@ declare namespace ts {
applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>; applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>;
/** @deprecated `fileName` will be ignored */ /** @deprecated `fileName` will be ignored */
applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>; applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason): ApplicableRefactorInfo[]; getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): ApplicableRefactorInfo[];
getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined;
organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
@ -5791,6 +5801,10 @@ declare namespace ts {
* the current context. * the current context.
*/ */
notApplicableReason?: string; notApplicableReason?: string;
/**
* The hierarchical dotted name of the refactor action.
*/
kind?: string;
} }
/** /**
* A set of edits to make in response to a refactor action, plus an optional * A set of edits to make in response to a refactor action, plus an optional
@ -6006,11 +6020,15 @@ declare namespace ts {
interface RenameInfoOptions { interface RenameInfoOptions {
readonly allowRenameOfImportPath?: boolean; readonly allowRenameOfImportPath?: boolean;
} }
interface DocCommentTemplateOptions {
readonly generateReturnInDocTemplate?: boolean;
}
interface SignatureHelpParameter { interface SignatureHelpParameter {
name: string; name: string;
documentation: SymbolDisplayPart[]; documentation: SymbolDisplayPart[];
displayParts: SymbolDisplayPart[]; displayParts: SymbolDisplayPart[];
isOptional: boolean; isOptional: boolean;
isRest?: boolean;
} }
interface SelectionRange { interface SelectionRange {
textSpan: TextSpan; textSpan: TextSpan;
@ -6447,7 +6465,7 @@ declare namespace ts {
(text: string, isSingleQuote?: boolean | undefined, hasExtendedUnicodeEscape?: boolean | undefined): StringLiteral; (text: string, isSingleQuote?: boolean | undefined, hasExtendedUnicodeEscape?: boolean | undefined): StringLiteral;
}; };
/** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */
const createStringLiteralFromNode: (sourceNode: Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral, isSingleQuote?: boolean | undefined) => StringLiteral; const createStringLiteralFromNode: (sourceNode: PropertyNameLiteral, isSingleQuote?: boolean | undefined) => StringLiteral;
/** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */
const createRegularExpressionLiteral: (text: string) => RegularExpressionLiteral; const createRegularExpressionLiteral: (text: string) => RegularExpressionLiteral;
/** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */
@ -6483,19 +6501,19 @@ declare namespace ts {
/** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */
const updateTypeParameterDeclaration: (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined) => TypeParameterDeclaration; const updateTypeParameterDeclaration: (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined) => TypeParameterDeclaration;
/** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */
const createParameter: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | Identifier | ObjectBindingPattern | ArrayBindingPattern, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined) => ParameterDeclaration; const createParameter: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined) => ParameterDeclaration;
/** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */
const updateParameter: (node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | Identifier | ObjectBindingPattern | ArrayBindingPattern, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => ParameterDeclaration; const updateParameter: (node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => ParameterDeclaration;
/** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */
const createDecorator: (expression: Expression) => Decorator; const createDecorator: (expression: Expression) => Decorator;
/** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */
const updateDecorator: (node: Decorator, expression: Expression) => Decorator; const updateDecorator: (node: Decorator, expression: Expression) => Decorator;
/** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */
const createProperty: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertyDeclaration; const createProperty: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertyDeclaration;
/** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */
const updateProperty: (node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertyDeclaration; const updateProperty: (node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertyDeclaration;
/** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */
const createMethod: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => MethodDeclaration; const createMethod: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => MethodDeclaration;
/** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */
const updateMethod: (node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => MethodDeclaration; const updateMethod: (node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => MethodDeclaration;
/** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */
@ -6503,11 +6521,11 @@ declare namespace ts {
/** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */
const updateConstructor: (node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined) => ConstructorDeclaration; const updateConstructor: (node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined) => ConstructorDeclaration;
/** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */
const createGetAccessor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => GetAccessorDeclaration; const createGetAccessor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => GetAccessorDeclaration;
/** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */
const updateGetAccessor: (node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => GetAccessorDeclaration; const updateGetAccessor: (node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => GetAccessorDeclaration;
/** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */
const createSetAccessor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, parameters: readonly ParameterDeclaration[], body: Block | undefined) => SetAccessorDeclaration; const createSetAccessor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined) => SetAccessorDeclaration;
/** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */
const updateSetAccessor: (node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined) => SetAccessorDeclaration; const updateSetAccessor: (node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined) => SetAccessorDeclaration;
/** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */
@ -6527,7 +6545,7 @@ declare namespace ts {
/** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */
const updateTypePredicateNodeWithModifier: (node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode; const updateTypePredicateNodeWithModifier: (node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode;
/** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */
const createTypeReferenceNode: (typeName: string | Identifier | QualifiedName, typeArguments?: readonly TypeNode[] | undefined) => TypeReferenceNode; const createTypeReferenceNode: (typeName: string | EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeReferenceNode;
/** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */
const updateTypeReferenceNode: (node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined) => TypeReferenceNode; const updateTypeReferenceNode: (node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined) => TypeReferenceNode;
/** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */
@ -6579,9 +6597,9 @@ declare namespace ts {
/** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */
const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode; const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode;
/** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */
const createImportTypeNode: (argument: TypeNode, qualifier?: Identifier | QualifiedName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode; const createImportTypeNode: (argument: TypeNode, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode;
/** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */
const updateImportTypeNode: (node: ImportTypeNode, argument: TypeNode, qualifier: Identifier | QualifiedName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode; const updateImportTypeNode: (node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode;
/** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */
const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode; const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode;
/** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */
@ -6599,9 +6617,9 @@ declare namespace ts {
/** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */
const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, 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. */ /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */
const createLiteralTypeNode: (literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; const createLiteralTypeNode: (literal: LiteralExpression | BooleanLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode;
/** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */
const updateLiteralTypeNode: (node: LiteralTypeNode, literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; const updateLiteralTypeNode: (node: LiteralTypeNode, literal: LiteralExpression | BooleanLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode;
/** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */
const createObjectBindingPattern: (elements: readonly BindingElement[]) => ObjectBindingPattern; const createObjectBindingPattern: (elements: readonly BindingElement[]) => ObjectBindingPattern;
/** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */
@ -6611,84 +6629,84 @@ declare namespace ts {
/** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */
const updateArrayBindingPattern: (node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]) => ArrayBindingPattern; const updateArrayBindingPattern: (node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]) => ArrayBindingPattern;
/** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */
const createBindingElement: (dotDotDotToken: DotDotDotToken | undefined, propertyName: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | undefined, name: string | Identifier | ObjectBindingPattern | ArrayBindingPattern, initializer?: Expression | undefined) => BindingElement; const createBindingElement: (dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression | undefined) => BindingElement;
/** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */
const updateBindingElement: (node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | undefined, name: BindingName, initializer: Expression | undefined) => BindingElement; const updateBindingElement: (node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined) => BindingElement;
/** @deprecated Use `factory.createArrayLiteral` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createArrayLiteralExpression` or the factory supplied by your transformation context instead. */
const createArrayLiteral: (elements?: readonly Expression[] | undefined, multiLine?: boolean | undefined) => ArrayLiteralExpression; const createArrayLiteral: (elements?: readonly Expression[] | undefined, multiLine?: boolean | undefined) => ArrayLiteralExpression;
/** @deprecated Use `factory.updateArrayLiteral` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateArrayLiteralExpression` or the factory supplied by your transformation context instead. */
const updateArrayLiteral: (node: ArrayLiteralExpression, elements: readonly Expression[]) => ArrayLiteralExpression; const updateArrayLiteral: (node: ArrayLiteralExpression, elements: readonly Expression[]) => ArrayLiteralExpression;
/** @deprecated Use `factory.createObjectLiteral` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createObjectLiteralExpression` or the factory supplied by your transformation context instead. */
const createObjectLiteral: (properties?: readonly ObjectLiteralElementLike[] | undefined, multiLine?: boolean | undefined) => ObjectLiteralExpression; const createObjectLiteral: (properties?: readonly ObjectLiteralElementLike[] | undefined, multiLine?: boolean | undefined) => ObjectLiteralExpression;
/** @deprecated Use `factory.updateObjectLiteral` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateObjectLiteralExpression` or the factory supplied by your transformation context instead. */
const updateObjectLiteral: (node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]) => ObjectLiteralExpression; const updateObjectLiteral: (node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]) => ObjectLiteralExpression;
/** @deprecated Use `factory.createPropertyAccess` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createPropertyAccessExpression` or the factory supplied by your transformation context instead. */
const createPropertyAccess: (expression: Expression, name: string | Identifier | PrivateIdentifier) => PropertyAccessExpression; const createPropertyAccess: (expression: Expression, name: string | Identifier | PrivateIdentifier) => PropertyAccessExpression;
/** @deprecated Use `factory.updatePropertyAccess` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updatePropertyAccessExpression` or the factory supplied by your transformation context instead. */
const updatePropertyAccess: (node: PropertyAccessExpression, expression: Expression, name: Identifier | PrivateIdentifier) => PropertyAccessExpression; const updatePropertyAccess: (node: PropertyAccessExpression, expression: Expression, name: Identifier | PrivateIdentifier) => PropertyAccessExpression;
/** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */
const createPropertyAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | Identifier | PrivateIdentifier) => PropertyAccessChain; const createPropertyAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | Identifier | PrivateIdentifier) => PropertyAccessChain;
/** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */
const updatePropertyAccessChain: (node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: Identifier | PrivateIdentifier) => PropertyAccessChain; const updatePropertyAccessChain: (node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: Identifier | PrivateIdentifier) => PropertyAccessChain;
/** @deprecated Use `factory.createElementAccess` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createElementAccessExpression` or the factory supplied by your transformation context instead. */
const createElementAccess: (expression: Expression, index: number | Expression) => ElementAccessExpression; const createElementAccess: (expression: Expression, index: number | Expression) => ElementAccessExpression;
/** @deprecated Use `factory.updateElementAccess` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateElementAccessExpression` or the factory supplied by your transformation context instead. */
const updateElementAccess: (node: ElementAccessExpression, expression: Expression, argumentExpression: Expression) => ElementAccessExpression; const updateElementAccess: (node: ElementAccessExpression, expression: Expression, argumentExpression: Expression) => ElementAccessExpression;
/** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */
const createElementAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression) => ElementAccessChain; const createElementAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression) => ElementAccessChain;
/** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */
const updateElementAccessChain: (node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression) => ElementAccessChain; const updateElementAccessChain: (node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression) => ElementAccessChain;
/** @deprecated Use `factory.createCall` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createCallExpression` or the factory supplied by your transformation context instead. */
const createCall: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallExpression; const createCall: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallExpression;
/** @deprecated Use `factory.updateCall` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateCallExpression` or the factory supplied by your transformation context instead. */
const updateCall: (node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallExpression; const updateCall: (node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallExpression;
/** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */
const createCallChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallChain; const createCallChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallChain;
/** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */
const updateCallChain: (node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallChain; const updateCallChain: (node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallChain;
/** @deprecated Use `factory.createNew` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createNewExpression` or the factory supplied by your transformation context instead. */
const createNew: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression; const createNew: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression;
/** @deprecated Use `factory.updateNew` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateNewExpression` or the factory supplied by your transformation context instead. */
const updateNew: (node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression; const updateNew: (node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression;
/** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */
const createTypeAssertion: (type: TypeNode, expression: Expression) => TypeAssertion; const createTypeAssertion: (type: TypeNode, expression: Expression) => TypeAssertion;
/** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */
const updateTypeAssertion: (node: TypeAssertion, type: TypeNode, expression: Expression) => TypeAssertion; const updateTypeAssertion: (node: TypeAssertion, type: TypeNode, expression: Expression) => TypeAssertion;
/** @deprecated Use `factory.createParen` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createParenthesizedExpression` or the factory supplied by your transformation context instead. */
const createParen: (expression: Expression) => ParenthesizedExpression; const createParen: (expression: Expression) => ParenthesizedExpression;
/** @deprecated Use `factory.updateParen` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateParenthesizedExpression` or the factory supplied by your transformation context instead. */
const updateParen: (node: ParenthesizedExpression, expression: Expression) => ParenthesizedExpression; const updateParen: (node: ParenthesizedExpression, expression: Expression) => ParenthesizedExpression;
/** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */
const createFunctionExpression: (modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block) => FunctionExpression; const createFunctionExpression: (modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block) => FunctionExpression;
/** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */
const updateFunctionExpression: (node: FunctionExpression, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block) => FunctionExpression; const updateFunctionExpression: (node: FunctionExpression, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block) => FunctionExpression;
/** @deprecated Use `factory.createDelete` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createDeleteExpression` or the factory supplied by your transformation context instead. */
const createDelete: (expression: Expression) => DeleteExpression; const createDelete: (expression: Expression) => DeleteExpression;
/** @deprecated Use `factory.updateDelete` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateDeleteExpression` or the factory supplied by your transformation context instead. */
const updateDelete: (node: DeleteExpression, expression: Expression) => DeleteExpression; const updateDelete: (node: DeleteExpression, expression: Expression) => DeleteExpression;
/** @deprecated Use `factory.createTypeOf` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createTypeOfExpression` or the factory supplied by your transformation context instead. */
const createTypeOf: (expression: Expression) => TypeOfExpression; const createTypeOf: (expression: Expression) => TypeOfExpression;
/** @deprecated Use `factory.updateTypeOf` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateTypeOfExpression` or the factory supplied by your transformation context instead. */
const updateTypeOf: (node: TypeOfExpression, expression: Expression) => TypeOfExpression; const updateTypeOf: (node: TypeOfExpression, expression: Expression) => TypeOfExpression;
/** @deprecated Use `factory.createVoid` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createVoidExpression` or the factory supplied by your transformation context instead. */
const createVoid: (expression: Expression) => VoidExpression; const createVoid: (expression: Expression) => VoidExpression;
/** @deprecated Use `factory.updateVoid` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateVoidExpression` or the factory supplied by your transformation context instead. */
const updateVoid: (node: VoidExpression, expression: Expression) => VoidExpression; const updateVoid: (node: VoidExpression, expression: Expression) => VoidExpression;
/** @deprecated Use `factory.createAwait` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createAwaitExpression` or the factory supplied by your transformation context instead. */
const createAwait: (expression: Expression) => AwaitExpression; const createAwait: (expression: Expression) => AwaitExpression;
/** @deprecated Use `factory.updateAwait` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateAwaitExpression` or the factory supplied by your transformation context instead. */
const updateAwait: (node: AwaitExpression, expression: Expression) => AwaitExpression; const updateAwait: (node: AwaitExpression, expression: Expression) => AwaitExpression;
/** @deprecated Use `factory.createPrefix` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createPrefixExpression` or the factory supplied by your transformation context instead. */
const createPrefix: (operator: PrefixUnaryOperator, operand: Expression) => PrefixUnaryExpression; const createPrefix: (operator: PrefixUnaryOperator, operand: Expression) => PrefixUnaryExpression;
/** @deprecated Use `factory.updatePrefix` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updatePrefixExpression` or the factory supplied by your transformation context instead. */
const updatePrefix: (node: PrefixUnaryExpression, operand: Expression) => PrefixUnaryExpression; const updatePrefix: (node: PrefixUnaryExpression, operand: Expression) => PrefixUnaryExpression;
/** @deprecated Use `factory.createPostfix` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createPostfixUnaryExpression` or the factory supplied by your transformation context instead. */
const createPostfix: (operand: Expression, operator: PostfixUnaryOperator) => PostfixUnaryExpression; const createPostfix: (operand: Expression, operator: PostfixUnaryOperator) => PostfixUnaryExpression;
/** @deprecated Use `factory.updatePostfix` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updatePostfixUnaryExpression` or the factory supplied by your transformation context instead. */
const updatePostfix: (node: PostfixUnaryExpression, operand: Expression) => PostfixUnaryExpression; const updatePostfix: (node: PostfixUnaryExpression, operand: Expression) => PostfixUnaryExpression;
/** @deprecated Use `factory.createBinary` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createBinaryExpression` or the factory supplied by your transformation context instead. */
const createBinary: (left: Expression, operator: SyntaxKind.CommaToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | 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.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | BinaryOperatorToken, right: Expression) => BinaryExpression; const createBinary: (left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression) => BinaryExpression;
/** @deprecated Use `factory.updateConditional` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateConditionalExpression` or the factory supplied by your transformation context instead. */
const updateConditional: (node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression) => ConditionalExpression; const updateConditional: (node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression) => ConditionalExpression;
/** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */
const createTemplateExpression: (head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression; const createTemplateExpression: (head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression;
@ -6714,11 +6732,11 @@ declare namespace ts {
(text: string, rawText?: string | undefined): NoSubstitutionTemplateLiteral; (text: string, rawText?: string | undefined): NoSubstitutionTemplateLiteral;
(text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral; (text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral;
}; };
/** @deprecated Use `factory.updateYield` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateYieldExpression` or the factory supplied by your transformation context instead. */
const updateYield: (node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined) => YieldExpression; const updateYield: (node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined) => YieldExpression;
/** @deprecated Use `factory.createSpread` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createSpreadExpression` or the factory supplied by your transformation context instead. */
const createSpread: (expression: Expression) => SpreadElement; const createSpread: (expression: Expression) => SpreadElement;
/** @deprecated Use `factory.updateSpread` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateSpreadExpression` or the factory supplied by your transformation context instead. */
const updateSpread: (node: SpreadElement, expression: Expression) => SpreadElement; const updateSpread: (node: SpreadElement, expression: Expression) => SpreadElement;
/** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */
const createOmittedExpression: () => OmittedExpression; const createOmittedExpression: () => OmittedExpression;
@ -6762,61 +6780,61 @@ declare namespace ts {
const createStatement: (expression: Expression) => ExpressionStatement; const createStatement: (expression: Expression) => ExpressionStatement;
/** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */
const updateStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement; const updateStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement;
/** @deprecated Use `factory.createIf` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createIfStatement` or the factory supplied by your transformation context instead. */
const createIf: (expression: Expression, thenStatement: Statement, elseStatement?: Statement | undefined) => IfStatement; const createIf: (expression: Expression, thenStatement: Statement, elseStatement?: Statement | undefined) => IfStatement;
/** @deprecated Use `factory.updateIf` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateIfStatement` or the factory supplied by your transformation context instead. */
const updateIf: (node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined) => IfStatement; const updateIf: (node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined) => IfStatement;
/** @deprecated Use `factory.createDo` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createDoStatement` or the factory supplied by your transformation context instead. */
const createDo: (statement: Statement, expression: Expression) => DoStatement; const createDo: (statement: Statement, expression: Expression) => DoStatement;
/** @deprecated Use `factory.updateDo` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateDoStatement` or the factory supplied by your transformation context instead. */
const updateDo: (node: DoStatement, statement: Statement, expression: Expression) => DoStatement; const updateDo: (node: DoStatement, statement: Statement, expression: Expression) => DoStatement;
/** @deprecated Use `factory.createWhile` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createWhileStatement` or the factory supplied by your transformation context instead. */
const createWhile: (expression: Expression, statement: Statement) => WhileStatement; const createWhile: (expression: Expression, statement: Statement) => WhileStatement;
/** @deprecated Use `factory.updateWhile` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateWhileStatement` or the factory supplied by your transformation context instead. */
const updateWhile: (node: WhileStatement, expression: Expression, statement: Statement) => WhileStatement; const updateWhile: (node: WhileStatement, expression: Expression, statement: Statement) => WhileStatement;
/** @deprecated Use `factory.createFor` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createForStatement` or the factory supplied by your transformation context instead. */
const createFor: (initializer: Expression | VariableDeclarationList | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement; const createFor: (initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement;
/** @deprecated Use `factory.updateFor` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateForStatement` or the factory supplied by your transformation context instead. */
const updateFor: (node: ForStatement, initializer: Expression | VariableDeclarationList | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement; const updateFor: (node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement;
/** @deprecated Use `factory.createForIn` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createForInStatement` or the factory supplied by your transformation context instead. */
const createForIn: (initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement; const createForIn: (initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement;
/** @deprecated Use `factory.updateForIn` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateForInStatement` or the factory supplied by your transformation context instead. */
const updateForIn: (node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement; const updateForIn: (node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement;
/** @deprecated Use `factory.createForOf` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createForOfStatement` or the factory supplied by your transformation context instead. */
const createForOf: (awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement; const createForOf: (awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement;
/** @deprecated Use `factory.updateForOf` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateForOfStatement` or the factory supplied by your transformation context instead. */
const updateForOf: (node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement; const updateForOf: (node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement;
/** @deprecated Use `factory.createContinue` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createContinueStatement` or the factory supplied by your transformation context instead. */
const createContinue: (label?: string | Identifier | undefined) => ContinueStatement; const createContinue: (label?: string | Identifier | undefined) => ContinueStatement;
/** @deprecated Use `factory.updateContinue` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateContinueStatement` or the factory supplied by your transformation context instead. */
const updateContinue: (node: ContinueStatement, label: Identifier | undefined) => ContinueStatement; const updateContinue: (node: ContinueStatement, label: Identifier | undefined) => ContinueStatement;
/** @deprecated Use `factory.createBreak` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createBreakStatement` or the factory supplied by your transformation context instead. */
const createBreak: (label?: string | Identifier | undefined) => BreakStatement; const createBreak: (label?: string | Identifier | undefined) => BreakStatement;
/** @deprecated Use `factory.updateBreak` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateBreakStatement` or the factory supplied by your transformation context instead. */
const updateBreak: (node: BreakStatement, label: Identifier | undefined) => BreakStatement; const updateBreak: (node: BreakStatement, label: Identifier | undefined) => BreakStatement;
/** @deprecated Use `factory.createReturn` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createReturnStatement` or the factory supplied by your transformation context instead. */
const createReturn: (expression?: Expression | undefined) => ReturnStatement; const createReturn: (expression?: Expression | undefined) => ReturnStatement;
/** @deprecated Use `factory.updateReturn` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateReturnStatement` or the factory supplied by your transformation context instead. */
const updateReturn: (node: ReturnStatement, expression: Expression | undefined) => ReturnStatement; const updateReturn: (node: ReturnStatement, expression: Expression | undefined) => ReturnStatement;
/** @deprecated Use `factory.createWith` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createWithStatement` or the factory supplied by your transformation context instead. */
const createWith: (expression: Expression, statement: Statement) => WithStatement; const createWith: (expression: Expression, statement: Statement) => WithStatement;
/** @deprecated Use `factory.updateWith` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateWithStatement` or the factory supplied by your transformation context instead. */
const updateWith: (node: WithStatement, expression: Expression, statement: Statement) => WithStatement; const updateWith: (node: WithStatement, expression: Expression, statement: Statement) => WithStatement;
/** @deprecated Use `factory.createSwitch` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createSwitchStatement` or the factory supplied by your transformation context instead. */
const createSwitch: (expression: Expression, caseBlock: CaseBlock) => SwitchStatement; const createSwitch: (expression: Expression, caseBlock: CaseBlock) => SwitchStatement;
/** @deprecated Use `factory.updateSwitch` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateSwitchStatement` or the factory supplied by your transformation context instead. */
const updateSwitch: (node: SwitchStatement, expression: Expression, caseBlock: CaseBlock) => SwitchStatement; const updateSwitch: (node: SwitchStatement, expression: Expression, caseBlock: CaseBlock) => SwitchStatement;
/** @deprecated Use `factory.createLabel` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createLabelStatement` or the factory supplied by your transformation context instead. */
const createLabel: (label: string | Identifier, statement: Statement) => LabeledStatement; const createLabel: (label: string | Identifier, statement: Statement) => LabeledStatement;
/** @deprecated Use `factory.updateLabel` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateLabelStatement` or the factory supplied by your transformation context instead. */
const updateLabel: (node: LabeledStatement, label: Identifier, statement: Statement) => LabeledStatement; const updateLabel: (node: LabeledStatement, label: Identifier, statement: Statement) => LabeledStatement;
/** @deprecated Use `factory.createThrow` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createThrowStatement` or the factory supplied by your transformation context instead. */
const createThrow: (expression: Expression) => ThrowStatement; const createThrow: (expression: Expression) => ThrowStatement;
/** @deprecated Use `factory.updateThrow` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateThrowStatement` or the factory supplied by your transformation context instead. */
const updateThrow: (node: ThrowStatement, expression: Expression) => ThrowStatement; const updateThrow: (node: ThrowStatement, expression: Expression) => ThrowStatement;
/** @deprecated Use `factory.createTry` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createTryStatement` or the factory supplied by your transformation context instead. */
const createTry: (tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement; const createTry: (tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement;
/** @deprecated Use `factory.updateTry` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateTryStatement` or the factory supplied by your transformation context instead. */
const updateTry: (node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement; const updateTry: (node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement;
/** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */
const createDebuggerStatement: () => DebuggerStatement; const createDebuggerStatement: () => DebuggerStatement;
@ -6845,9 +6863,9 @@ declare namespace ts {
/** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */
const updateEnumDeclaration: (node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]) => EnumDeclaration; const updateEnumDeclaration: (node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]) => EnumDeclaration;
/** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */
const createModuleDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: Identifier | ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | undefined, flags?: NodeFlags | undefined) => ModuleDeclaration; const createModuleDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags | undefined) => ModuleDeclaration;
/** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */
const updateModuleDeclaration: (node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: Identifier | ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | undefined) => ModuleDeclaration; const updateModuleDeclaration: (node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined) => ModuleDeclaration;
/** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */
const createModuleBlock: (statements: readonly Statement[]) => ModuleBlock; const createModuleBlock: (statements: readonly Statement[]) => ModuleBlock;
/** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */
@ -6861,9 +6879,9 @@ declare namespace ts {
/** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */
const updateNamespaceExportDeclaration: (node: NamespaceExportDeclaration, name: Identifier) => NamespaceExportDeclaration; const updateNamespaceExportDeclaration: (node: NamespaceExportDeclaration, name: Identifier) => NamespaceExportDeclaration;
/** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */
const createImportEqualsDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference) => ImportEqualsDeclaration; const createImportEqualsDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference) => ImportEqualsDeclaration;
/** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */
const updateImportEqualsDeclaration: (node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference) => ImportEqualsDeclaration; const updateImportEqualsDeclaration: (node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference) => ImportEqualsDeclaration;
/** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */
const createImportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression) => ImportDeclaration; const createImportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression) => ImportDeclaration;
/** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */
@ -7005,7 +7023,7 @@ declare namespace ts {
/** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */
const updateCatchClause: (node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block) => CatchClause; const updateCatchClause: (node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block) => CatchClause;
/** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */
const createPropertyAssignment: (name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, initializer: Expression) => PropertyAssignment; const createPropertyAssignment: (name: string | PropertyName, initializer: Expression) => PropertyAssignment;
/** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */
const updatePropertyAssignment: (node: PropertyAssignment, name: PropertyName, initializer: Expression) => PropertyAssignment; const updatePropertyAssignment: (node: PropertyAssignment, name: PropertyName, initializer: Expression) => PropertyAssignment;
/** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */
@ -7017,7 +7035,7 @@ declare namespace ts {
/** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */
const updateSpreadAssignment: (node: SpreadAssignment, expression: Expression) => SpreadAssignment; const updateSpreadAssignment: (node: SpreadAssignment, expression: Expression) => SpreadAssignment;
/** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */
const createEnumMember: (name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, initializer?: Expression | undefined) => EnumMember; const createEnumMember: (name: string | PropertyName, initializer?: Expression | undefined) => EnumMember;
/** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */
const updateEnumMember: (node: EnumMember, name: PropertyName, initializer: Expression | undefined) => EnumMember; const updateEnumMember: (node: EnumMember, name: PropertyName, initializer: Expression | undefined) => EnumMember;
/** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */
@ -7028,9 +7046,9 @@ declare namespace ts {
const createPartiallyEmittedExpression: (expression: Expression, original?: Node | undefined) => PartiallyEmittedExpression; const createPartiallyEmittedExpression: (expression: Expression, original?: Node | undefined) => PartiallyEmittedExpression;
/** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */
const updatePartiallyEmittedExpression: (node: PartiallyEmittedExpression, expression: Expression) => PartiallyEmittedExpression; const updatePartiallyEmittedExpression: (node: PartiallyEmittedExpression, expression: Expression) => PartiallyEmittedExpression;
/** @deprecated Use `factory.createCommaList` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createCommaListExpression` or the factory supplied by your transformation context instead. */
const createCommaList: (elements: readonly Expression[]) => CommaListExpression; const createCommaList: (elements: readonly Expression[]) => CommaListExpression;
/** @deprecated Use `factory.updateCommaList` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateCommaListExpression` or the factory supplied by your transformation context instead. */
const updateCommaList: (node: CommaListExpression, elements: readonly Expression[]) => CommaListExpression; const updateCommaList: (node: CommaListExpression, elements: readonly Expression[]) => CommaListExpression;
/** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */
const createBundle: (sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle; const createBundle: (sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle;
@ -7184,7 +7202,7 @@ declare namespace ts {
* NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be * NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be
* captured with respect to transformations. * captured with respect to transformations.
* *
* @deprecated Use `factory.cloneNode` instead and use `setCommentRange` or `setSourceMapRange` and avoid setting `parent`. * @deprecated Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`.
*/ */
const getMutableClone: <T extends Node>(node: T) => T; const getMutableClone: <T extends Node>(node: T) => T;
/** @deprecated Use `isTypeAssertionExpression` instead. */ /** @deprecated Use `isTypeAssertionExpression` instead. */

View file

@ -4,5 +4,9 @@ unitTest(function version(): void {
const pattern = /^\d+\.\d+\.\d+/; const pattern = /^\d+\.\d+\.\d+/;
assert(pattern.test(Deno.version.deno)); assert(pattern.test(Deno.version.deno));
assert(pattern.test(Deno.version.v8)); assert(pattern.test(Deno.version.v8));
assert(pattern.test(Deno.version.typescript)); // Unreleased version of TypeScript now set the version to 0-dev
assert(
pattern.test(Deno.version.typescript) ||
Deno.version.typescript === "0-dev",
);
}); });

8084
cli/tsc/00_typescript.js vendored

File diff suppressed because it is too large Load diff