Update LKG

This commit is contained in:
Mohamed Hegazy 2015-07-13 11:13:12 -07:00
parent babddd69b8
commit 965f994ace
12 changed files with 31271 additions and 21368 deletions

13
bin/lib.core.d.ts vendored
View file

@ -1184,3 +1184,16 @@ declare type ClassDecorator = <TFunction extends Function>(target: TFunction) =>
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void; declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void; declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
interface PromiseLike<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
}

25
bin/lib.core.es6.d.ts vendored
View file

@ -1184,6 +1184,19 @@ declare type ClassDecorator = <TFunction extends Function>(target: TFunction) =>
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void; declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void; declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
interface PromiseLike<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
}
declare type PropertyKey = string | number | symbol; declare type PropertyKey = string | number | symbol;
interface Symbol { interface Symbol {
@ -4759,17 +4772,6 @@ declare module Reflect {
function setPrototypeOf(target: any, proto: any): boolean; function setPrototypeOf(target: any, proto: any): boolean;
} }
interface PromiseLike<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
}
/** /**
* Represents the completion of an asynchronous operation * Represents the completion of an asynchronous operation
*/ */
@ -4789,6 +4791,7 @@ interface Promise<T> {
* @returns A Promise for the completion of the callback. * @returns A Promise for the completion of the callback.
*/ */
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>; catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
catch(onrejected?: (reason: any) => void): Promise<T>;
[Symbol.toStringTag]: string; [Symbol.toStringTag]: string;
} }

114
bin/lib.d.ts vendored
View file

@ -1185,6 +1185,19 @@ declare type PropertyDecorator = (target: Object, propertyKey: string | symbol)
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void; declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
interface PromiseLike<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
}
///////////////////////////// /////////////////////////////
/// IE10 ECMAScript Extensions /// IE10 ECMAScript Extensions
///////////////////////////// /////////////////////////////
@ -4755,16 +4768,11 @@ interface CanvasRenderingContext2D {
clearRect(x: number, y: number, w: number, h: number): void; clearRect(x: number, y: number, w: number, h: number): void;
clip(fillRule?: string): void; clip(fillRule?: string): void;
closePath(): void; closePath(): void;
createImageData(imageDataOrSw: number, sh?: number): ImageData; createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
createImageData(imageDataOrSw: ImageData, sh?: number): ImageData;
createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
createPattern(image: HTMLImageElement, repetition: string): CanvasPattern; createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
createPattern(image: HTMLCanvasElement, repetition: string): CanvasPattern;
createPattern(image: HTMLVideoElement, repetition: string): CanvasPattern;
createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
drawImage(image: HTMLImageElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void; drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
drawImage(image: HTMLCanvasElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
drawImage(image: HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
fill(fillRule?: string): void; fill(fillRule?: string): void;
fillRect(x: number, y: number, w: number, h: number): void; fillRect(x: number, y: number, w: number, h: number): void;
fillText(text: string, x: number, y: number, maxWidth?: number): void; fillText(text: string, x: number, y: number, maxWidth?: number): void;
@ -5922,12 +5930,12 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* @param elementId String that specifies the ID value. Case-insensitive. * @param elementId String that specifies the ID value. Case-insensitive.
*/ */
getElementById(elementId: string): HTMLElement; getElementById(elementId: string): HTMLElement;
getElementsByClassName(classNames: string): NodeList; getElementsByClassName(classNames: string): NodeListOf<Element>;
/** /**
* Gets a collection of objects based on the value of the NAME or ID attribute. * Gets a collection of objects based on the value of the NAME or ID attribute.
* @param elementName Gets a collection of objects based on the value of the NAME or ID attribute. * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
*/ */
getElementsByName(elementName: string): NodeList; getElementsByName(elementName: string): NodeListOf<Element>;
/** /**
* Retrieves a collection of objects based on the specified element name. * Retrieves a collection of objects based on the specified element name.
* @param name Specifies the name of an element. * @param name Specifies the name of an element.
@ -6105,8 +6113,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
getElementsByTagName(tagname: "wbr"): NodeListOf<HTMLElement>; getElementsByTagName(tagname: "wbr"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>; getElementsByTagName(tagname: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLBlockElement>; getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLBlockElement>;
getElementsByTagName(tagname: string): NodeList; getElementsByTagName(tagname: string): NodeListOf<Element>;
getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
/** /**
* Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
*/ */
@ -6379,6 +6387,8 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
scrollTop: number; scrollTop: number;
scrollWidth: number; scrollWidth: number;
tagName: string; tagName: string;
id: string;
className: string;
getAttribute(name?: string): string; getAttribute(name?: string): string;
getAttributeNS(namespaceURI: string, localName: string): string; getAttributeNS(namespaceURI: string, localName: string): string;
getAttributeNode(name: string): Attr; getAttributeNode(name: string): Attr;
@ -6558,8 +6568,8 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
getElementsByTagName(name: "wbr"): NodeListOf<HTMLElement>; getElementsByTagName(name: "wbr"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>; getElementsByTagName(name: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
getElementsByTagName(name: "xmp"): NodeListOf<HTMLBlockElement>; getElementsByTagName(name: "xmp"): NodeListOf<HTMLBlockElement>;
getElementsByTagName(name: string): NodeList; getElementsByTagName(name: string): NodeListOf<Element>;
getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
hasAttribute(name: string): boolean; hasAttribute(name: string): boolean;
hasAttributeNS(namespaceURI: string, localName: string): boolean; hasAttributeNS(namespaceURI: string, localName: string): boolean;
msGetRegionContent(): MSRangeCollection; msGetRegionContent(): MSRangeCollection;
@ -6740,7 +6750,7 @@ interface FormData {
declare var FormData: { declare var FormData: {
prototype: FormData; prototype: FormData;
new(): FormData; new (form?: HTMLFormElement): FormData;
} }
interface GainNode extends AudioNode { interface GainNode extends AudioNode {
@ -7033,8 +7043,7 @@ interface HTMLAreasCollection extends HTMLCollection {
/** /**
* Adds an element to the areas, controlRange, or options collection. * Adds an element to the areas, controlRange, or options collection.
*/ */
add(element: HTMLElement, before?: HTMLElement): void; add(element: HTMLElement, before?: HTMLElement | number): void;
add(element: HTMLElement, before?: number): void;
/** /**
* Removes an element from the collection. * Removes an element from the collection.
*/ */
@ -7478,14 +7487,12 @@ declare var HTMLDocument: {
interface HTMLElement extends Element { interface HTMLElement extends Element {
accessKey: string; accessKey: string;
children: HTMLCollection; children: HTMLCollection;
className: string;
contentEditable: string; contentEditable: string;
dataset: DOMStringMap; dataset: DOMStringMap;
dir: string; dir: string;
draggable: boolean; draggable: boolean;
hidden: boolean; hidden: boolean;
hideFocus: boolean; hideFocus: boolean;
id: string;
innerHTML: string; innerHTML: string;
innerText: string; innerText: string;
isContentEditable: boolean; isContentEditable: boolean;
@ -7572,7 +7579,7 @@ interface HTMLElement extends Element {
contains(child: HTMLElement): boolean; contains(child: HTMLElement): boolean;
dragDrop(): boolean; dragDrop(): boolean;
focus(): void; focus(): void;
getElementsByClassName(classNames: string): NodeList; getElementsByClassName(classNames: string): NodeListOf<Element>;
insertAdjacentElement(position: string, insertedElement: Element): Element; insertAdjacentElement(position: string, insertedElement: Element): Element;
insertAdjacentHTML(where: string, html: string): void; insertAdjacentHTML(where: string, html: string): void;
insertAdjacentText(where: string, text: string): void; insertAdjacentText(where: string, text: string): void;
@ -9782,8 +9789,7 @@ interface HTMLSelectElement extends HTMLElement {
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection. * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
* @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
*/ */
add(element: HTMLElement, before?: HTMLElement): void; add(element: HTMLElement, before?: HTMLElement | number): void;
add(element: HTMLElement, before?: number): void;
/** /**
* Returns whether a form will validate when it is submitted, without having to submit it. * Returns whether a form will validate when it is submitted, without having to submit it.
*/ */
@ -12385,6 +12391,7 @@ declare var SVGDescElement: {
interface SVGElement extends Element { interface SVGElement extends Element {
id: string; id: string;
className: any;
onclick: (ev: MouseEvent) => any; onclick: (ev: MouseEvent) => any;
ondblclick: (ev: MouseEvent) => any; ondblclick: (ev: MouseEvent) => any;
onfocusin: (ev: FocusEvent) => any; onfocusin: (ev: FocusEvent) => any;
@ -13944,8 +13951,7 @@ interface Screen extends EventTarget {
systemXDPI: number; systemXDPI: number;
systemYDPI: number; systemYDPI: number;
width: number; width: number;
msLockOrientation(orientations: string): boolean; msLockOrientation(orientations: string | string[]): boolean;
msLockOrientation(orientations: string[]): boolean;
msUnlockOrientation(): void; msUnlockOrientation(): void;
addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void; addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
@ -14017,8 +14023,7 @@ interface SourceBuffer extends EventTarget {
updating: boolean; updating: boolean;
videoTracks: VideoTrackList; videoTracks: VideoTrackList;
abort(): void; abort(): void;
appendBuffer(data: ArrayBuffer): void; appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
appendBuffer(data: ArrayBufferView): void;
appendStream(stream: MSStream, maxSize?: number): void; appendStream(stream: MSStream, maxSize?: number): void;
remove(start: number, end: number): void; remove(start: number, end: number): void;
} }
@ -14126,33 +14131,18 @@ declare var StyleSheetPageList: {
} }
interface SubtleCrypto { interface SubtleCrypto {
decrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any; decrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
decrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any; deriveBits(algorithm: string | Algorithm, baseKey: CryptoKey, length: number): any;
deriveBits(algorithm: string, baseKey: CryptoKey, length: number): any; deriveKey(algorithm: string | Algorithm, baseKey: CryptoKey, derivedKeyType: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
deriveBits(algorithm: Algorithm, baseKey: CryptoKey, length: number): any; digest(algorithm: string | Algorithm, data: ArrayBufferView): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any; encrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
digest(algorithm: string, data: ArrayBufferView): any;
digest(algorithm: Algorithm, data: ArrayBufferView): any;
encrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
encrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
exportKey(format: string, key: CryptoKey): any; exportKey(format: string, key: CryptoKey): any;
generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): any; generateKey(algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
generateKey(algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; importKey(format: string, keyData: ArrayBufferView, algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: string, extractable: boolean, keyUsages: string[]): any; sign(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | Algorithm, unwrappedKeyAlgorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
sign(algorithm: string, key: CryptoKey, data: ArrayBufferView): any; verify(algorithm: string | Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
sign(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any; wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | Algorithm): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
verify(algorithm: string, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
verify(algorithm: Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: Algorithm): any;
} }
declare var SubtleCrypto: { declare var SubtleCrypto: {
@ -14661,11 +14651,8 @@ interface WebGLRenderingContext {
blendEquationSeparate(modeRGB: number, modeAlpha: number): void; blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
blendFunc(sfactor: number, dfactor: number): void; blendFunc(sfactor: number, dfactor: number): void;
blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void; blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
bufferData(target: number, size: number, usage: number): void; bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
bufferData(target: number, size: ArrayBufferView, usage: number): void; bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
bufferData(target: number, size: any, usage: number): void;
bufferSubData(target: number, offset: number, data: ArrayBufferView): void;
bufferSubData(target: number, offset: number, data: any): void;
checkFramebufferStatus(target: number): number; checkFramebufferStatus(target: number): number;
clear(mask: number): void; clear(mask: number): void;
clearColor(red: number, green: number, blue: number, alpha: number): void; clearColor(red: number, green: number, blue: number, alpha: number): void;
@ -15508,8 +15495,7 @@ interface WebSocket extends EventTarget {
declare var WebSocket: { declare var WebSocket: {
prototype: WebSocket; prototype: WebSocket;
new(url: string, protocols?: string): WebSocket; new(url: string, protocols?: string | string[]): WebSocket;
new(url: string, protocols?: any): WebSocket;
CLOSED: number; CLOSED: number;
CLOSING: number; CLOSING: number;
CONNECTING: number; CONNECTING: number;
@ -15675,6 +15661,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
toolbar: BarProp; toolbar: BarProp;
top: Window; top: Window;
window: Window; window: Window;
URL: URL;
alert(message?: any): void; alert(message?: any): void;
blur(): void; blur(): void;
cancelAnimationFrame(handle: number): void; cancelAnimationFrame(handle: number): void;
@ -16178,7 +16165,7 @@ interface NavigatorStorageUtils {
interface NodeSelector { interface NodeSelector {
querySelector(selectors: string): Element; querySelector(selectors: string): Element;
querySelectorAll(selectors: string): NodeList; querySelectorAll(selectors: string): NodeListOf<Element>;
} }
interface RandomSource { interface RandomSource {
@ -16226,7 +16213,7 @@ interface SVGLocatable {
} }
interface SVGStylable { interface SVGStylable {
className: SVGAnimatedString; className: any;
style: CSSStyleDeclaration; style: CSSStyleDeclaration;
} }
@ -16313,8 +16300,7 @@ interface EventListenerObject {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
interface ErrorEventHandler { interface ErrorEventHandler {
(event: Event, source?: string, fileno?: number, columnNumber?: number): void; (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
(event: string, source?: string, fileno?: number, columnNumber?: number): void;
} }
interface PositionCallback { interface PositionCallback {
(position: Position): void; (position: Position): void;
@ -16490,6 +16476,7 @@ declare var styleMedia: StyleMedia;
declare var toolbar: BarProp; declare var toolbar: BarProp;
declare var top: Window; declare var top: Window;
declare var window: Window; declare var window: Window;
declare var URL: URL;
declare function alert(message?: any): void; declare function alert(message?: any): void;
declare function blur(): void; declare function blur(): void;
declare function cancelAnimationFrame(handle: number): void; declare function cancelAnimationFrame(handle: number): void;
@ -16642,7 +16629,6 @@ declare function addEventListener(type: "volumechange", listener: (ev: Event) =>
declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
///////////////////////////// /////////////////////////////
/// WorkerGlobalScope APIs /// WorkerGlobalScope APIs
///////////////////////////// /////////////////////////////

102
bin/lib.dom.d.ts vendored
View file

@ -3585,16 +3585,11 @@ interface CanvasRenderingContext2D {
clearRect(x: number, y: number, w: number, h: number): void; clearRect(x: number, y: number, w: number, h: number): void;
clip(fillRule?: string): void; clip(fillRule?: string): void;
closePath(): void; closePath(): void;
createImageData(imageDataOrSw: number, sh?: number): ImageData; createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
createImageData(imageDataOrSw: ImageData, sh?: number): ImageData;
createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
createPattern(image: HTMLImageElement, repetition: string): CanvasPattern; createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
createPattern(image: HTMLCanvasElement, repetition: string): CanvasPattern;
createPattern(image: HTMLVideoElement, repetition: string): CanvasPattern;
createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
drawImage(image: HTMLImageElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void; drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
drawImage(image: HTMLCanvasElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
drawImage(image: HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
fill(fillRule?: string): void; fill(fillRule?: string): void;
fillRect(x: number, y: number, w: number, h: number): void; fillRect(x: number, y: number, w: number, h: number): void;
fillText(text: string, x: number, y: number, maxWidth?: number): void; fillText(text: string, x: number, y: number, maxWidth?: number): void;
@ -4752,12 +4747,12 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* @param elementId String that specifies the ID value. Case-insensitive. * @param elementId String that specifies the ID value. Case-insensitive.
*/ */
getElementById(elementId: string): HTMLElement; getElementById(elementId: string): HTMLElement;
getElementsByClassName(classNames: string): NodeList; getElementsByClassName(classNames: string): NodeListOf<Element>;
/** /**
* Gets a collection of objects based on the value of the NAME or ID attribute. * Gets a collection of objects based on the value of the NAME or ID attribute.
* @param elementName Gets a collection of objects based on the value of the NAME or ID attribute. * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
*/ */
getElementsByName(elementName: string): NodeList; getElementsByName(elementName: string): NodeListOf<Element>;
/** /**
* Retrieves a collection of objects based on the specified element name. * Retrieves a collection of objects based on the specified element name.
* @param name Specifies the name of an element. * @param name Specifies the name of an element.
@ -4935,8 +4930,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
getElementsByTagName(tagname: "wbr"): NodeListOf<HTMLElement>; getElementsByTagName(tagname: "wbr"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>; getElementsByTagName(tagname: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLBlockElement>; getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLBlockElement>;
getElementsByTagName(tagname: string): NodeList; getElementsByTagName(tagname: string): NodeListOf<Element>;
getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
/** /**
* Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
*/ */
@ -5209,6 +5204,8 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
scrollTop: number; scrollTop: number;
scrollWidth: number; scrollWidth: number;
tagName: string; tagName: string;
id: string;
className: string;
getAttribute(name?: string): string; getAttribute(name?: string): string;
getAttributeNS(namespaceURI: string, localName: string): string; getAttributeNS(namespaceURI: string, localName: string): string;
getAttributeNode(name: string): Attr; getAttributeNode(name: string): Attr;
@ -5388,8 +5385,8 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
getElementsByTagName(name: "wbr"): NodeListOf<HTMLElement>; getElementsByTagName(name: "wbr"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>; getElementsByTagName(name: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
getElementsByTagName(name: "xmp"): NodeListOf<HTMLBlockElement>; getElementsByTagName(name: "xmp"): NodeListOf<HTMLBlockElement>;
getElementsByTagName(name: string): NodeList; getElementsByTagName(name: string): NodeListOf<Element>;
getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
hasAttribute(name: string): boolean; hasAttribute(name: string): boolean;
hasAttributeNS(namespaceURI: string, localName: string): boolean; hasAttributeNS(namespaceURI: string, localName: string): boolean;
msGetRegionContent(): MSRangeCollection; msGetRegionContent(): MSRangeCollection;
@ -5570,7 +5567,7 @@ interface FormData {
declare var FormData: { declare var FormData: {
prototype: FormData; prototype: FormData;
new(): FormData; new (form?: HTMLFormElement): FormData;
} }
interface GainNode extends AudioNode { interface GainNode extends AudioNode {
@ -5863,8 +5860,7 @@ interface HTMLAreasCollection extends HTMLCollection {
/** /**
* Adds an element to the areas, controlRange, or options collection. * Adds an element to the areas, controlRange, or options collection.
*/ */
add(element: HTMLElement, before?: HTMLElement): void; add(element: HTMLElement, before?: HTMLElement | number): void;
add(element: HTMLElement, before?: number): void;
/** /**
* Removes an element from the collection. * Removes an element from the collection.
*/ */
@ -6308,14 +6304,12 @@ declare var HTMLDocument: {
interface HTMLElement extends Element { interface HTMLElement extends Element {
accessKey: string; accessKey: string;
children: HTMLCollection; children: HTMLCollection;
className: string;
contentEditable: string; contentEditable: string;
dataset: DOMStringMap; dataset: DOMStringMap;
dir: string; dir: string;
draggable: boolean; draggable: boolean;
hidden: boolean; hidden: boolean;
hideFocus: boolean; hideFocus: boolean;
id: string;
innerHTML: string; innerHTML: string;
innerText: string; innerText: string;
isContentEditable: boolean; isContentEditable: boolean;
@ -6402,7 +6396,7 @@ interface HTMLElement extends Element {
contains(child: HTMLElement): boolean; contains(child: HTMLElement): boolean;
dragDrop(): boolean; dragDrop(): boolean;
focus(): void; focus(): void;
getElementsByClassName(classNames: string): NodeList; getElementsByClassName(classNames: string): NodeListOf<Element>;
insertAdjacentElement(position: string, insertedElement: Element): Element; insertAdjacentElement(position: string, insertedElement: Element): Element;
insertAdjacentHTML(where: string, html: string): void; insertAdjacentHTML(where: string, html: string): void;
insertAdjacentText(where: string, text: string): void; insertAdjacentText(where: string, text: string): void;
@ -8612,8 +8606,7 @@ interface HTMLSelectElement extends HTMLElement {
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection. * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
* @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
*/ */
add(element: HTMLElement, before?: HTMLElement): void; add(element: HTMLElement, before?: HTMLElement | number): void;
add(element: HTMLElement, before?: number): void;
/** /**
* Returns whether a form will validate when it is submitted, without having to submit it. * Returns whether a form will validate when it is submitted, without having to submit it.
*/ */
@ -11215,6 +11208,7 @@ declare var SVGDescElement: {
interface SVGElement extends Element { interface SVGElement extends Element {
id: string; id: string;
className: any;
onclick: (ev: MouseEvent) => any; onclick: (ev: MouseEvent) => any;
ondblclick: (ev: MouseEvent) => any; ondblclick: (ev: MouseEvent) => any;
onfocusin: (ev: FocusEvent) => any; onfocusin: (ev: FocusEvent) => any;
@ -12774,8 +12768,7 @@ interface Screen extends EventTarget {
systemXDPI: number; systemXDPI: number;
systemYDPI: number; systemYDPI: number;
width: number; width: number;
msLockOrientation(orientations: string): boolean; msLockOrientation(orientations: string | string[]): boolean;
msLockOrientation(orientations: string[]): boolean;
msUnlockOrientation(): void; msUnlockOrientation(): void;
addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void; addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
@ -12847,8 +12840,7 @@ interface SourceBuffer extends EventTarget {
updating: boolean; updating: boolean;
videoTracks: VideoTrackList; videoTracks: VideoTrackList;
abort(): void; abort(): void;
appendBuffer(data: ArrayBuffer): void; appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
appendBuffer(data: ArrayBufferView): void;
appendStream(stream: MSStream, maxSize?: number): void; appendStream(stream: MSStream, maxSize?: number): void;
remove(start: number, end: number): void; remove(start: number, end: number): void;
} }
@ -12956,33 +12948,18 @@ declare var StyleSheetPageList: {
} }
interface SubtleCrypto { interface SubtleCrypto {
decrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any; decrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
decrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any; deriveBits(algorithm: string | Algorithm, baseKey: CryptoKey, length: number): any;
deriveBits(algorithm: string, baseKey: CryptoKey, length: number): any; deriveKey(algorithm: string | Algorithm, baseKey: CryptoKey, derivedKeyType: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
deriveBits(algorithm: Algorithm, baseKey: CryptoKey, length: number): any; digest(algorithm: string | Algorithm, data: ArrayBufferView): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any; encrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
digest(algorithm: string, data: ArrayBufferView): any;
digest(algorithm: Algorithm, data: ArrayBufferView): any;
encrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
encrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
exportKey(format: string, key: CryptoKey): any; exportKey(format: string, key: CryptoKey): any;
generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): any; generateKey(algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
generateKey(algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; importKey(format: string, keyData: ArrayBufferView, algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: string, extractable: boolean, keyUsages: string[]): any; sign(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | Algorithm, unwrappedKeyAlgorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
sign(algorithm: string, key: CryptoKey, data: ArrayBufferView): any; verify(algorithm: string | Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
sign(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any; wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | Algorithm): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
verify(algorithm: string, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
verify(algorithm: Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: Algorithm): any;
} }
declare var SubtleCrypto: { declare var SubtleCrypto: {
@ -13491,11 +13468,8 @@ interface WebGLRenderingContext {
blendEquationSeparate(modeRGB: number, modeAlpha: number): void; blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
blendFunc(sfactor: number, dfactor: number): void; blendFunc(sfactor: number, dfactor: number): void;
blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void; blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
bufferData(target: number, size: number, usage: number): void; bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
bufferData(target: number, size: ArrayBufferView, usage: number): void; bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
bufferData(target: number, size: any, usage: number): void;
bufferSubData(target: number, offset: number, data: ArrayBufferView): void;
bufferSubData(target: number, offset: number, data: any): void;
checkFramebufferStatus(target: number): number; checkFramebufferStatus(target: number): number;
clear(mask: number): void; clear(mask: number): void;
clearColor(red: number, green: number, blue: number, alpha: number): void; clearColor(red: number, green: number, blue: number, alpha: number): void;
@ -14338,8 +14312,7 @@ interface WebSocket extends EventTarget {
declare var WebSocket: { declare var WebSocket: {
prototype: WebSocket; prototype: WebSocket;
new(url: string, protocols?: string): WebSocket; new(url: string, protocols?: string | string[]): WebSocket;
new(url: string, protocols?: any): WebSocket;
CLOSED: number; CLOSED: number;
CLOSING: number; CLOSING: number;
CONNECTING: number; CONNECTING: number;
@ -14505,6 +14478,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
toolbar: BarProp; toolbar: BarProp;
top: Window; top: Window;
window: Window; window: Window;
URL: URL;
alert(message?: any): void; alert(message?: any): void;
blur(): void; blur(): void;
cancelAnimationFrame(handle: number): void; cancelAnimationFrame(handle: number): void;
@ -15008,7 +14982,7 @@ interface NavigatorStorageUtils {
interface NodeSelector { interface NodeSelector {
querySelector(selectors: string): Element; querySelector(selectors: string): Element;
querySelectorAll(selectors: string): NodeList; querySelectorAll(selectors: string): NodeListOf<Element>;
} }
interface RandomSource { interface RandomSource {
@ -15056,7 +15030,7 @@ interface SVGLocatable {
} }
interface SVGStylable { interface SVGStylable {
className: SVGAnimatedString; className: any;
style: CSSStyleDeclaration; style: CSSStyleDeclaration;
} }
@ -15143,8 +15117,7 @@ interface EventListenerObject {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
interface ErrorEventHandler { interface ErrorEventHandler {
(event: Event, source?: string, fileno?: number, columnNumber?: number): void; (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
(event: string, source?: string, fileno?: number, columnNumber?: number): void;
} }
interface PositionCallback { interface PositionCallback {
(position: Position): void; (position: Position): void;
@ -15320,6 +15293,7 @@ declare var styleMedia: StyleMedia;
declare var toolbar: BarProp; declare var toolbar: BarProp;
declare var top: Window; declare var top: Window;
declare var window: Window; declare var window: Window;
declare var URL: URL;
declare function alert(message?: any): void; declare function alert(message?: any): void;
declare function blur(): void; declare function blur(): void;
declare function cancelAnimationFrame(handle: number): void; declare function cancelAnimationFrame(handle: number): void;
@ -15471,4 +15445,4 @@ declare function addEventListener(type: "unload", listener: (ev: Event) => any,
declare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;

128
bin/lib.es6.d.ts vendored
View file

@ -1184,6 +1184,19 @@ declare type ClassDecorator = <TFunction extends Function>(target: TFunction) =>
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void; declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void; declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
interface PromiseLike<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
}
declare type PropertyKey = string | number | symbol; declare type PropertyKey = string | number | symbol;
interface Symbol { interface Symbol {
@ -4759,17 +4772,6 @@ declare module Reflect {
function setPrototypeOf(target: any, proto: any): boolean; function setPrototypeOf(target: any, proto: any): boolean;
} }
interface PromiseLike<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
}
/** /**
* Represents the completion of an asynchronous operation * Represents the completion of an asynchronous operation
*/ */
@ -4789,6 +4791,7 @@ interface Promise<T> {
* @returns A Promise for the completion of the callback. * @returns A Promise for the completion of the callback.
*/ */
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>; catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
catch(onrejected?: (reason: any) => void): Promise<T>;
[Symbol.toStringTag]: string; [Symbol.toStringTag]: string;
} }
@ -6137,16 +6140,11 @@ interface CanvasRenderingContext2D {
clearRect(x: number, y: number, w: number, h: number): void; clearRect(x: number, y: number, w: number, h: number): void;
clip(fillRule?: string): void; clip(fillRule?: string): void;
closePath(): void; closePath(): void;
createImageData(imageDataOrSw: number, sh?: number): ImageData; createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
createImageData(imageDataOrSw: ImageData, sh?: number): ImageData;
createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
createPattern(image: HTMLImageElement, repetition: string): CanvasPattern; createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
createPattern(image: HTMLCanvasElement, repetition: string): CanvasPattern;
createPattern(image: HTMLVideoElement, repetition: string): CanvasPattern;
createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
drawImage(image: HTMLImageElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void; drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
drawImage(image: HTMLCanvasElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
drawImage(image: HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
fill(fillRule?: string): void; fill(fillRule?: string): void;
fillRect(x: number, y: number, w: number, h: number): void; fillRect(x: number, y: number, w: number, h: number): void;
fillText(text: string, x: number, y: number, maxWidth?: number): void; fillText(text: string, x: number, y: number, maxWidth?: number): void;
@ -7304,12 +7302,12 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* @param elementId String that specifies the ID value. Case-insensitive. * @param elementId String that specifies the ID value. Case-insensitive.
*/ */
getElementById(elementId: string): HTMLElement; getElementById(elementId: string): HTMLElement;
getElementsByClassName(classNames: string): NodeList; getElementsByClassName(classNames: string): NodeListOf<Element>;
/** /**
* Gets a collection of objects based on the value of the NAME or ID attribute. * Gets a collection of objects based on the value of the NAME or ID attribute.
* @param elementName Gets a collection of objects based on the value of the NAME or ID attribute. * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
*/ */
getElementsByName(elementName: string): NodeList; getElementsByName(elementName: string): NodeListOf<Element>;
/** /**
* Retrieves a collection of objects based on the specified element name. * Retrieves a collection of objects based on the specified element name.
* @param name Specifies the name of an element. * @param name Specifies the name of an element.
@ -7487,8 +7485,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
getElementsByTagName(tagname: "wbr"): NodeListOf<HTMLElement>; getElementsByTagName(tagname: "wbr"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>; getElementsByTagName(tagname: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLBlockElement>; getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLBlockElement>;
getElementsByTagName(tagname: string): NodeList; getElementsByTagName(tagname: string): NodeListOf<Element>;
getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
/** /**
* Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
*/ */
@ -7761,6 +7759,8 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
scrollTop: number; scrollTop: number;
scrollWidth: number; scrollWidth: number;
tagName: string; tagName: string;
id: string;
className: string;
getAttribute(name?: string): string; getAttribute(name?: string): string;
getAttributeNS(namespaceURI: string, localName: string): string; getAttributeNS(namespaceURI: string, localName: string): string;
getAttributeNode(name: string): Attr; getAttributeNode(name: string): Attr;
@ -7940,8 +7940,8 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
getElementsByTagName(name: "wbr"): NodeListOf<HTMLElement>; getElementsByTagName(name: "wbr"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>; getElementsByTagName(name: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
getElementsByTagName(name: "xmp"): NodeListOf<HTMLBlockElement>; getElementsByTagName(name: "xmp"): NodeListOf<HTMLBlockElement>;
getElementsByTagName(name: string): NodeList; getElementsByTagName(name: string): NodeListOf<Element>;
getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
hasAttribute(name: string): boolean; hasAttribute(name: string): boolean;
hasAttributeNS(namespaceURI: string, localName: string): boolean; hasAttributeNS(namespaceURI: string, localName: string): boolean;
msGetRegionContent(): MSRangeCollection; msGetRegionContent(): MSRangeCollection;
@ -8122,7 +8122,7 @@ interface FormData {
declare var FormData: { declare var FormData: {
prototype: FormData; prototype: FormData;
new(): FormData; new (form?: HTMLFormElement): FormData;
} }
interface GainNode extends AudioNode { interface GainNode extends AudioNode {
@ -8415,8 +8415,7 @@ interface HTMLAreasCollection extends HTMLCollection {
/** /**
* Adds an element to the areas, controlRange, or options collection. * Adds an element to the areas, controlRange, or options collection.
*/ */
add(element: HTMLElement, before?: HTMLElement): void; add(element: HTMLElement, before?: HTMLElement | number): void;
add(element: HTMLElement, before?: number): void;
/** /**
* Removes an element from the collection. * Removes an element from the collection.
*/ */
@ -8860,14 +8859,12 @@ declare var HTMLDocument: {
interface HTMLElement extends Element { interface HTMLElement extends Element {
accessKey: string; accessKey: string;
children: HTMLCollection; children: HTMLCollection;
className: string;
contentEditable: string; contentEditable: string;
dataset: DOMStringMap; dataset: DOMStringMap;
dir: string; dir: string;
draggable: boolean; draggable: boolean;
hidden: boolean; hidden: boolean;
hideFocus: boolean; hideFocus: boolean;
id: string;
innerHTML: string; innerHTML: string;
innerText: string; innerText: string;
isContentEditable: boolean; isContentEditable: boolean;
@ -8954,7 +8951,7 @@ interface HTMLElement extends Element {
contains(child: HTMLElement): boolean; contains(child: HTMLElement): boolean;
dragDrop(): boolean; dragDrop(): boolean;
focus(): void; focus(): void;
getElementsByClassName(classNames: string): NodeList; getElementsByClassName(classNames: string): NodeListOf<Element>;
insertAdjacentElement(position: string, insertedElement: Element): Element; insertAdjacentElement(position: string, insertedElement: Element): Element;
insertAdjacentHTML(where: string, html: string): void; insertAdjacentHTML(where: string, html: string): void;
insertAdjacentText(where: string, text: string): void; insertAdjacentText(where: string, text: string): void;
@ -11164,8 +11161,7 @@ interface HTMLSelectElement extends HTMLElement {
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection. * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
* @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
*/ */
add(element: HTMLElement, before?: HTMLElement): void; add(element: HTMLElement, before?: HTMLElement | number): void;
add(element: HTMLElement, before?: number): void;
/** /**
* Returns whether a form will validate when it is submitted, without having to submit it. * Returns whether a form will validate when it is submitted, without having to submit it.
*/ */
@ -13767,6 +13763,7 @@ declare var SVGDescElement: {
interface SVGElement extends Element { interface SVGElement extends Element {
id: string; id: string;
className: any;
onclick: (ev: MouseEvent) => any; onclick: (ev: MouseEvent) => any;
ondblclick: (ev: MouseEvent) => any; ondblclick: (ev: MouseEvent) => any;
onfocusin: (ev: FocusEvent) => any; onfocusin: (ev: FocusEvent) => any;
@ -15326,8 +15323,7 @@ interface Screen extends EventTarget {
systemXDPI: number; systemXDPI: number;
systemYDPI: number; systemYDPI: number;
width: number; width: number;
msLockOrientation(orientations: string): boolean; msLockOrientation(orientations: string | string[]): boolean;
msLockOrientation(orientations: string[]): boolean;
msUnlockOrientation(): void; msUnlockOrientation(): void;
addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void; addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
@ -15399,8 +15395,7 @@ interface SourceBuffer extends EventTarget {
updating: boolean; updating: boolean;
videoTracks: VideoTrackList; videoTracks: VideoTrackList;
abort(): void; abort(): void;
appendBuffer(data: ArrayBuffer): void; appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
appendBuffer(data: ArrayBufferView): void;
appendStream(stream: MSStream, maxSize?: number): void; appendStream(stream: MSStream, maxSize?: number): void;
remove(start: number, end: number): void; remove(start: number, end: number): void;
} }
@ -15508,33 +15503,18 @@ declare var StyleSheetPageList: {
} }
interface SubtleCrypto { interface SubtleCrypto {
decrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any; decrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
decrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any; deriveBits(algorithm: string | Algorithm, baseKey: CryptoKey, length: number): any;
deriveBits(algorithm: string, baseKey: CryptoKey, length: number): any; deriveKey(algorithm: string | Algorithm, baseKey: CryptoKey, derivedKeyType: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
deriveBits(algorithm: Algorithm, baseKey: CryptoKey, length: number): any; digest(algorithm: string | Algorithm, data: ArrayBufferView): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any; encrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
digest(algorithm: string, data: ArrayBufferView): any;
digest(algorithm: Algorithm, data: ArrayBufferView): any;
encrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
encrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
exportKey(format: string, key: CryptoKey): any; exportKey(format: string, key: CryptoKey): any;
generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): any; generateKey(algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
generateKey(algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; importKey(format: string, keyData: ArrayBufferView, algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: string, extractable: boolean, keyUsages: string[]): any; sign(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any; unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | Algorithm, unwrappedKeyAlgorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
sign(algorithm: string, key: CryptoKey, data: ArrayBufferView): any; verify(algorithm: string | Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
sign(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any; wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | Algorithm): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
verify(algorithm: string, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
verify(algorithm: Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: Algorithm): any;
} }
declare var SubtleCrypto: { declare var SubtleCrypto: {
@ -16043,11 +16023,8 @@ interface WebGLRenderingContext {
blendEquationSeparate(modeRGB: number, modeAlpha: number): void; blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
blendFunc(sfactor: number, dfactor: number): void; blendFunc(sfactor: number, dfactor: number): void;
blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void; blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
bufferData(target: number, size: number, usage: number): void; bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
bufferData(target: number, size: ArrayBufferView, usage: number): void; bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
bufferData(target: number, size: any, usage: number): void;
bufferSubData(target: number, offset: number, data: ArrayBufferView): void;
bufferSubData(target: number, offset: number, data: any): void;
checkFramebufferStatus(target: number): number; checkFramebufferStatus(target: number): number;
clear(mask: number): void; clear(mask: number): void;
clearColor(red: number, green: number, blue: number, alpha: number): void; clearColor(red: number, green: number, blue: number, alpha: number): void;
@ -16890,8 +16867,7 @@ interface WebSocket extends EventTarget {
declare var WebSocket: { declare var WebSocket: {
prototype: WebSocket; prototype: WebSocket;
new(url: string, protocols?: string): WebSocket; new(url: string, protocols?: string | string[]): WebSocket;
new(url: string, protocols?: any): WebSocket;
CLOSED: number; CLOSED: number;
CLOSING: number; CLOSING: number;
CONNECTING: number; CONNECTING: number;
@ -17057,6 +17033,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
toolbar: BarProp; toolbar: BarProp;
top: Window; top: Window;
window: Window; window: Window;
URL: URL;
alert(message?: any): void; alert(message?: any): void;
blur(): void; blur(): void;
cancelAnimationFrame(handle: number): void; cancelAnimationFrame(handle: number): void;
@ -17560,7 +17537,7 @@ interface NavigatorStorageUtils {
interface NodeSelector { interface NodeSelector {
querySelector(selectors: string): Element; querySelector(selectors: string): Element;
querySelectorAll(selectors: string): NodeList; querySelectorAll(selectors: string): NodeListOf<Element>;
} }
interface RandomSource { interface RandomSource {
@ -17608,7 +17585,7 @@ interface SVGLocatable {
} }
interface SVGStylable { interface SVGStylable {
className: SVGAnimatedString; className: any;
style: CSSStyleDeclaration; style: CSSStyleDeclaration;
} }
@ -17695,8 +17672,7 @@ interface EventListenerObject {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
interface ErrorEventHandler { interface ErrorEventHandler {
(event: Event, source?: string, fileno?: number, columnNumber?: number): void; (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
(event: string, source?: string, fileno?: number, columnNumber?: number): void;
} }
interface PositionCallback { interface PositionCallback {
(position: Position): void; (position: Position): void;
@ -17872,6 +17848,7 @@ declare var styleMedia: StyleMedia;
declare var toolbar: BarProp; declare var toolbar: BarProp;
declare var top: Window; declare var top: Window;
declare var window: Window; declare var window: Window;
declare var URL: URL;
declare function alert(message?: any): void; declare function alert(message?: any): void;
declare function blur(): void; declare function blur(): void;
declare function cancelAnimationFrame(handle: number): void; declare function cancelAnimationFrame(handle: number): void;
@ -18023,8 +18000,7 @@ declare function addEventListener(type: "unload", listener: (ev: Event) => any,
declare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;interface DOMTokenList {
interface DOMTokenList {
[Symbol.iterator](): IterableIterator<string>; [Symbol.iterator](): IterableIterator<string>;
} }

View file

@ -3064,8 +3064,7 @@ interface WebSocket extends EventTarget {
declare var WebSocket: { declare var WebSocket: {
prototype: WebSocket; prototype: WebSocket;
new(url: string, protocols?: string): WebSocket; new(url: string, protocols?: string | string[]): WebSocket;
new(url: string, protocols?: any): WebSocket;
CLOSED: number; CLOSED: number;
CLOSING: number; CLOSING: number;
CONNECTING: number; CONNECTING: number;
@ -3300,8 +3299,7 @@ interface EventListenerObject {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
interface ErrorEventHandler { interface ErrorEventHandler {
(event: Event, source?: string, fileno?: number, columnNumber?: number): void; (event: Event | string, source?: string, fileno?: number, columnNumber?: number): void;
(event: string, source?: string, fileno?: number, columnNumber?: number): void;
} }
interface PositionCallback { interface PositionCallback {
(position: Position): void; (position: Position): void;

9631
bin/tsc.js

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

666
bin/typescript.d.ts vendored
View file

@ -54,250 +54,265 @@ declare module "typescript" {
SemicolonToken = 22, SemicolonToken = 22,
CommaToken = 23, CommaToken = 23,
LessThanToken = 24, LessThanToken = 24,
GreaterThanToken = 25, LessThanSlashToken = 25,
LessThanEqualsToken = 26, GreaterThanToken = 26,
GreaterThanEqualsToken = 27, LessThanEqualsToken = 27,
EqualsEqualsToken = 28, GreaterThanEqualsToken = 28,
ExclamationEqualsToken = 29, EqualsEqualsToken = 29,
EqualsEqualsEqualsToken = 30, ExclamationEqualsToken = 30,
ExclamationEqualsEqualsToken = 31, EqualsEqualsEqualsToken = 31,
EqualsGreaterThanToken = 32, ExclamationEqualsEqualsToken = 32,
PlusToken = 33, EqualsGreaterThanToken = 33,
MinusToken = 34, PlusToken = 34,
AsteriskToken = 35, MinusToken = 35,
SlashToken = 36, AsteriskToken = 36,
PercentToken = 37, SlashToken = 37,
PlusPlusToken = 38, PercentToken = 38,
MinusMinusToken = 39, PlusPlusToken = 39,
LessThanLessThanToken = 40, MinusMinusToken = 40,
GreaterThanGreaterThanToken = 41, LessThanLessThanToken = 41,
GreaterThanGreaterThanGreaterThanToken = 42, GreaterThanGreaterThanToken = 42,
AmpersandToken = 43, GreaterThanGreaterThanGreaterThanToken = 43,
BarToken = 44, AmpersandToken = 44,
CaretToken = 45, BarToken = 45,
ExclamationToken = 46, CaretToken = 46,
TildeToken = 47, ExclamationToken = 47,
AmpersandAmpersandToken = 48, TildeToken = 48,
BarBarToken = 49, AmpersandAmpersandToken = 49,
QuestionToken = 50, BarBarToken = 50,
ColonToken = 51, QuestionToken = 51,
AtToken = 52, ColonToken = 52,
EqualsToken = 53, AtToken = 53,
PlusEqualsToken = 54, EqualsToken = 54,
MinusEqualsToken = 55, PlusEqualsToken = 55,
AsteriskEqualsToken = 56, MinusEqualsToken = 56,
SlashEqualsToken = 57, AsteriskEqualsToken = 57,
PercentEqualsToken = 58, SlashEqualsToken = 58,
LessThanLessThanEqualsToken = 59, PercentEqualsToken = 59,
GreaterThanGreaterThanEqualsToken = 60, LessThanLessThanEqualsToken = 60,
GreaterThanGreaterThanGreaterThanEqualsToken = 61, GreaterThanGreaterThanEqualsToken = 61,
AmpersandEqualsToken = 62, GreaterThanGreaterThanGreaterThanEqualsToken = 62,
BarEqualsToken = 63, AmpersandEqualsToken = 63,
CaretEqualsToken = 64, BarEqualsToken = 64,
Identifier = 65, CaretEqualsToken = 65,
BreakKeyword = 66, Identifier = 66,
CaseKeyword = 67, BreakKeyword = 67,
CatchKeyword = 68, CaseKeyword = 68,
ClassKeyword = 69, CatchKeyword = 69,
ConstKeyword = 70, ClassKeyword = 70,
ContinueKeyword = 71, ConstKeyword = 71,
DebuggerKeyword = 72, ContinueKeyword = 72,
DefaultKeyword = 73, DebuggerKeyword = 73,
DeleteKeyword = 74, DefaultKeyword = 74,
DoKeyword = 75, DeleteKeyword = 75,
ElseKeyword = 76, DoKeyword = 76,
EnumKeyword = 77, ElseKeyword = 77,
ExportKeyword = 78, EnumKeyword = 78,
ExtendsKeyword = 79, ExportKeyword = 79,
FalseKeyword = 80, ExtendsKeyword = 80,
FinallyKeyword = 81, FalseKeyword = 81,
ForKeyword = 82, FinallyKeyword = 82,
FunctionKeyword = 83, ForKeyword = 83,
IfKeyword = 84, FunctionKeyword = 84,
ImportKeyword = 85, IfKeyword = 85,
InKeyword = 86, ImportKeyword = 86,
InstanceOfKeyword = 87, InKeyword = 87,
NewKeyword = 88, InstanceOfKeyword = 88,
NullKeyword = 89, NewKeyword = 89,
ReturnKeyword = 90, NullKeyword = 90,
SuperKeyword = 91, ReturnKeyword = 91,
SwitchKeyword = 92, SuperKeyword = 92,
ThisKeyword = 93, SwitchKeyword = 93,
ThrowKeyword = 94, ThisKeyword = 94,
TrueKeyword = 95, ThrowKeyword = 95,
TryKeyword = 96, TrueKeyword = 96,
TypeOfKeyword = 97, TryKeyword = 97,
VarKeyword = 98, TypeOfKeyword = 98,
VoidKeyword = 99, VarKeyword = 99,
WhileKeyword = 100, VoidKeyword = 100,
WithKeyword = 101, WhileKeyword = 101,
ImplementsKeyword = 102, WithKeyword = 102,
InterfaceKeyword = 103, ImplementsKeyword = 103,
LetKeyword = 104, InterfaceKeyword = 104,
PackageKeyword = 105, LetKeyword = 105,
PrivateKeyword = 106, PackageKeyword = 106,
ProtectedKeyword = 107, PrivateKeyword = 107,
PublicKeyword = 108, ProtectedKeyword = 108,
StaticKeyword = 109, PublicKeyword = 109,
YieldKeyword = 110, StaticKeyword = 110,
AsKeyword = 111, YieldKeyword = 111,
AnyKeyword = 112, AbstractKeyword = 112,
BooleanKeyword = 113, AsKeyword = 113,
ConstructorKeyword = 114, AnyKeyword = 114,
DeclareKeyword = 115, AsyncKeyword = 115,
GetKeyword = 116, AwaitKeyword = 116,
IsKeyword = 117, BooleanKeyword = 117,
ModuleKeyword = 118, ConstructorKeyword = 118,
NamespaceKeyword = 119, DeclareKeyword = 119,
RequireKeyword = 120, GetKeyword = 120,
NumberKeyword = 121, IsKeyword = 121,
SetKeyword = 122, ModuleKeyword = 122,
StringKeyword = 123, NamespaceKeyword = 123,
SymbolKeyword = 124, RequireKeyword = 124,
TypeKeyword = 125, NumberKeyword = 125,
FromKeyword = 126, SetKeyword = 126,
OfKeyword = 127, StringKeyword = 127,
QualifiedName = 128, SymbolKeyword = 128,
ComputedPropertyName = 129, TypeKeyword = 129,
TypeParameter = 130, FromKeyword = 130,
Parameter = 131, OfKeyword = 131,
Decorator = 132, QualifiedName = 132,
PropertySignature = 133, ComputedPropertyName = 133,
PropertyDeclaration = 134, TypeParameter = 134,
MethodSignature = 135, Parameter = 135,
MethodDeclaration = 136, Decorator = 136,
Constructor = 137, PropertySignature = 137,
GetAccessor = 138, PropertyDeclaration = 138,
SetAccessor = 139, MethodSignature = 139,
CallSignature = 140, MethodDeclaration = 140,
ConstructSignature = 141, Constructor = 141,
IndexSignature = 142, GetAccessor = 142,
TypePredicate = 143, SetAccessor = 143,
TypeReference = 144, CallSignature = 144,
FunctionType = 145, ConstructSignature = 145,
ConstructorType = 146, IndexSignature = 146,
TypeQuery = 147, TypePredicate = 147,
TypeLiteral = 148, TypeReference = 148,
ArrayType = 149, FunctionType = 149,
TupleType = 150, ConstructorType = 150,
UnionType = 151, TypeQuery = 151,
ParenthesizedType = 152, TypeLiteral = 152,
ObjectBindingPattern = 153, ArrayType = 153,
ArrayBindingPattern = 154, TupleType = 154,
BindingElement = 155, UnionType = 155,
ArrayLiteralExpression = 156, IntersectionType = 156,
ObjectLiteralExpression = 157, ParenthesizedType = 157,
PropertyAccessExpression = 158, ObjectBindingPattern = 158,
ElementAccessExpression = 159, ArrayBindingPattern = 159,
CallExpression = 160, BindingElement = 160,
NewExpression = 161, ArrayLiteralExpression = 161,
TaggedTemplateExpression = 162, ObjectLiteralExpression = 162,
TypeAssertionExpression = 163, PropertyAccessExpression = 163,
ParenthesizedExpression = 164, ElementAccessExpression = 164,
FunctionExpression = 165, CallExpression = 165,
ArrowFunction = 166, NewExpression = 166,
DeleteExpression = 167, TaggedTemplateExpression = 167,
TypeOfExpression = 168, TypeAssertionExpression = 168,
VoidExpression = 169, ParenthesizedExpression = 169,
PrefixUnaryExpression = 170, FunctionExpression = 170,
PostfixUnaryExpression = 171, ArrowFunction = 171,
BinaryExpression = 172, DeleteExpression = 172,
ConditionalExpression = 173, TypeOfExpression = 173,
TemplateExpression = 174, VoidExpression = 174,
YieldExpression = 175, AwaitExpression = 175,
SpreadElementExpression = 176, PrefixUnaryExpression = 176,
ClassExpression = 177, PostfixUnaryExpression = 177,
OmittedExpression = 178, BinaryExpression = 178,
ExpressionWithTypeArguments = 179, ConditionalExpression = 179,
TemplateSpan = 180, TemplateExpression = 180,
SemicolonClassElement = 181, YieldExpression = 181,
Block = 182, SpreadElementExpression = 182,
VariableStatement = 183, ClassExpression = 183,
EmptyStatement = 184, OmittedExpression = 184,
ExpressionStatement = 185, ExpressionWithTypeArguments = 185,
IfStatement = 186, AsExpression = 186,
DoStatement = 187, TemplateSpan = 187,
WhileStatement = 188, SemicolonClassElement = 188,
ForStatement = 189, Block = 189,
ForInStatement = 190, VariableStatement = 190,
ForOfStatement = 191, EmptyStatement = 191,
ContinueStatement = 192, ExpressionStatement = 192,
BreakStatement = 193, IfStatement = 193,
ReturnStatement = 194, DoStatement = 194,
WithStatement = 195, WhileStatement = 195,
SwitchStatement = 196, ForStatement = 196,
LabeledStatement = 197, ForInStatement = 197,
ThrowStatement = 198, ForOfStatement = 198,
TryStatement = 199, ContinueStatement = 199,
DebuggerStatement = 200, BreakStatement = 200,
VariableDeclaration = 201, ReturnStatement = 201,
VariableDeclarationList = 202, WithStatement = 202,
FunctionDeclaration = 203, SwitchStatement = 203,
ClassDeclaration = 204, LabeledStatement = 204,
InterfaceDeclaration = 205, ThrowStatement = 205,
TypeAliasDeclaration = 206, TryStatement = 206,
EnumDeclaration = 207, DebuggerStatement = 207,
ModuleDeclaration = 208, VariableDeclaration = 208,
ModuleBlock = 209, VariableDeclarationList = 209,
CaseBlock = 210, FunctionDeclaration = 210,
ImportEqualsDeclaration = 211, ClassDeclaration = 211,
ImportDeclaration = 212, InterfaceDeclaration = 212,
ImportClause = 213, TypeAliasDeclaration = 213,
NamespaceImport = 214, EnumDeclaration = 214,
NamedImports = 215, ModuleDeclaration = 215,
ImportSpecifier = 216, ModuleBlock = 216,
ExportAssignment = 217, CaseBlock = 217,
ExportDeclaration = 218, ImportEqualsDeclaration = 218,
NamedExports = 219, ImportDeclaration = 219,
ExportSpecifier = 220, ImportClause = 220,
MissingDeclaration = 221, NamespaceImport = 221,
ExternalModuleReference = 222, NamedImports = 222,
CaseClause = 223, ImportSpecifier = 223,
DefaultClause = 224, ExportAssignment = 224,
HeritageClause = 225, ExportDeclaration = 225,
CatchClause = 226, NamedExports = 226,
PropertyAssignment = 227, ExportSpecifier = 227,
ShorthandPropertyAssignment = 228, MissingDeclaration = 228,
EnumMember = 229, ExternalModuleReference = 229,
SourceFile = 230, JsxElement = 230,
JSDocTypeExpression = 231, JsxSelfClosingElement = 231,
JSDocAllType = 232, JsxOpeningElement = 232,
JSDocUnknownType = 233, JsxText = 233,
JSDocArrayType = 234, JsxClosingElement = 234,
JSDocUnionType = 235, JsxAttribute = 235,
JSDocTupleType = 236, JsxSpreadAttribute = 236,
JSDocNullableType = 237, JsxExpression = 237,
JSDocNonNullableType = 238, CaseClause = 238,
JSDocRecordType = 239, DefaultClause = 239,
JSDocRecordMember = 240, HeritageClause = 240,
JSDocTypeReference = 241, CatchClause = 241,
JSDocOptionalType = 242, PropertyAssignment = 242,
JSDocFunctionType = 243, ShorthandPropertyAssignment = 243,
JSDocVariadicType = 244, EnumMember = 244,
JSDocConstructorType = 245, SourceFile = 245,
JSDocThisType = 246, JSDocTypeExpression = 246,
JSDocComment = 247, JSDocAllType = 247,
JSDocTag = 248, JSDocUnknownType = 248,
JSDocParameterTag = 249, JSDocArrayType = 249,
JSDocReturnTag = 250, JSDocUnionType = 250,
JSDocTypeTag = 251, JSDocTupleType = 251,
JSDocTemplateTag = 252, JSDocNullableType = 252,
SyntaxList = 253, JSDocNonNullableType = 253,
Count = 254, JSDocRecordType = 254,
FirstAssignment = 53, JSDocRecordMember = 255,
LastAssignment = 64, JSDocTypeReference = 256,
FirstReservedWord = 66, JSDocOptionalType = 257,
LastReservedWord = 101, JSDocFunctionType = 258,
FirstKeyword = 66, JSDocVariadicType = 259,
LastKeyword = 127, JSDocConstructorType = 260,
FirstFutureReservedWord = 102, JSDocThisType = 261,
LastFutureReservedWord = 110, JSDocComment = 262,
FirstTypeNode = 144, JSDocTag = 263,
LastTypeNode = 152, JSDocParameterTag = 264,
JSDocReturnTag = 265,
JSDocTypeTag = 266,
JSDocTemplateTag = 267,
SyntaxList = 268,
Count = 269,
FirstAssignment = 54,
LastAssignment = 65,
FirstReservedWord = 67,
LastReservedWord = 102,
FirstKeyword = 67,
LastKeyword = 131,
FirstFutureReservedWord = 103,
LastFutureReservedWord = 111,
FirstTypeNode = 148,
LastTypeNode = 157,
FirstPunctuation = 14, FirstPunctuation = 14,
LastPunctuation = 64, LastPunctuation = 65,
FirstToken = 0, FirstToken = 0,
LastToken = 127, LastToken = 131,
FirstTriviaToken = 2, FirstTriviaToken = 2,
LastTriviaToken = 6, LastTriviaToken = 6,
FirstLiteralToken = 7, FirstLiteralToken = 7,
@ -305,8 +320,8 @@ declare module "typescript" {
FirstTemplateToken = 10, FirstTemplateToken = 10,
LastTemplateToken = 13, LastTemplateToken = 13,
FirstBinaryOperator = 24, FirstBinaryOperator = 24,
LastBinaryOperator = 64, LastBinaryOperator = 65,
FirstNode = 128, FirstNode = 132,
} }
const enum NodeFlags { const enum NodeFlags {
Export = 1, Export = 1,
@ -315,18 +330,28 @@ declare module "typescript" {
Private = 32, Private = 32,
Protected = 64, Protected = 64,
Static = 128, Static = 128,
Default = 256, Abstract = 256,
MultiLine = 512, Async = 512,
Synthetic = 1024, Default = 1024,
DeclarationFile = 2048, MultiLine = 2048,
Let = 4096, Synthetic = 4096,
Const = 8192, DeclarationFile = 8192,
OctalLiteral = 16384, Let = 16384,
Namespace = 32768, Const = 32768,
ExportContext = 65536, OctalLiteral = 65536,
Modifier = 499, Namespace = 131072,
ExportContext = 262144,
Modifier = 2035,
AccessibilityModifier = 112, AccessibilityModifier = 112,
BlockScoped = 12288, BlockScoped = 49152,
}
const enum JsxFlags {
None = 0,
IntrinsicNamedElement = 1,
IntrinsicIndexedElement = 2,
ClassElement = 4,
UnknownElement = 8,
IntrinsicElement = 3,
} }
interface Node extends TextRange { interface Node extends TextRange {
kind: SyntaxKind; kind: SyntaxKind;
@ -483,9 +508,13 @@ declare module "typescript" {
interface TupleTypeNode extends TypeNode { interface TupleTypeNode extends TypeNode {
elementTypes: NodeArray<TypeNode>; elementTypes: NodeArray<TypeNode>;
} }
interface UnionTypeNode extends TypeNode { interface UnionOrIntersectionTypeNode extends TypeNode {
types: NodeArray<TypeNode>; types: NodeArray<TypeNode>;
} }
interface UnionTypeNode extends UnionOrIntersectionTypeNode {
}
interface IntersectionTypeNode extends UnionOrIntersectionTypeNode {
}
interface ParenthesizedTypeNode extends TypeNode { interface ParenthesizedTypeNode extends TypeNode {
type: TypeNode; type: TypeNode;
} }
@ -528,6 +557,9 @@ declare module "typescript" {
interface VoidExpression extends UnaryExpression { interface VoidExpression extends UnaryExpression {
expression: UnaryExpression; expression: UnaryExpression;
} }
interface AwaitExpression extends UnaryExpression {
expression: UnaryExpression;
}
interface YieldExpression extends Expression { interface YieldExpression extends Expression {
asteriskToken?: Node; asteriskToken?: Node;
expression?: Expression; expression?: Expression;
@ -601,10 +633,46 @@ declare module "typescript" {
template: LiteralExpression | TemplateExpression; template: LiteralExpression | TemplateExpression;
} }
type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator; type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator;
interface AsExpression extends Expression {
expression: Expression;
type: TypeNode;
}
interface TypeAssertion extends UnaryExpression { interface TypeAssertion extends UnaryExpression {
type: TypeNode; type: TypeNode;
expression: UnaryExpression; expression: UnaryExpression;
} }
type AssertionExpression = TypeAssertion | AsExpression;
interface JsxElement extends PrimaryExpression {
openingElement: JsxOpeningElement;
children: NodeArray<JsxChild>;
closingElement: JsxClosingElement;
}
interface JsxOpeningElement extends Expression {
_openingElementBrand?: any;
tagName: EntityName;
attributes: NodeArray<JsxAttribute | JsxSpreadAttribute>;
}
interface JsxSelfClosingElement extends PrimaryExpression, JsxOpeningElement {
_selfClosingElementBrand?: any;
}
type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
interface JsxAttribute extends Node {
name: Identifier;
initializer?: Expression;
}
interface JsxSpreadAttribute extends Node {
expression: Expression;
}
interface JsxClosingElement extends Node {
tagName: EntityName;
}
interface JsxExpression extends Expression {
expression?: Expression;
}
interface JsxText extends Node {
_jsxTextExpressionBrand: any;
}
type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement;
interface Statement extends Node { interface Statement extends Node {
_statementBrand: any; _statementBrand: any;
} }
@ -859,6 +927,7 @@ declare module "typescript" {
}[]; }[];
moduleName: string; moduleName: string;
referencedFiles: FileReference[]; referencedFiles: FileReference[];
languageVariant: LanguageVariant;
/** /**
* lib.d.ts should have a reference comment like * lib.d.ts should have a reference comment like
* *
@ -881,6 +950,13 @@ declare module "typescript" {
interface WriteFileCallback { interface WriteFileCallback {
(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void;
} }
class OperationCanceledException {
}
interface CancellationToken {
isCancellationRequested(): boolean;
/** @throws OperationCanceledException if isCancellationRequested is true */
throwIfCancellationRequested(): void;
}
interface Program extends ScriptReferenceHost { interface Program extends ScriptReferenceHost {
/** /**
* Get a list of files in the program * Get a list of files in the program
@ -896,12 +972,12 @@ declare module "typescript" {
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
* will be invoked when writing the JavaScript and declaration files. * will be invoked when writing the JavaScript and declaration files.
*/ */
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult;
getOptionsDiagnostics(): Diagnostic[]; getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getGlobalDiagnostics(): Diagnostic[]; getGlobalDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
getSemanticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
getDeclarationDiagnostics(sourceFile?: SourceFile): Diagnostic[]; getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
/** /**
* Gets a type checker that can be used to semantically analyze source fils in the program. * Gets a type checker that can be used to semantically analyze source fils in the program.
*/ */
@ -976,6 +1052,8 @@ declare module "typescript" {
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
getAliasedSymbol(symbol: Symbol): Symbol; getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfModule(moduleSymbol: Symbol): Symbol[]; getExportsOfModule(moduleSymbol: Symbol): Symbol[];
getJsxElementAttributesType(elementNode: JsxOpeningLikeElement): Type;
getJsxIntrinsicTagNames(): Symbol[];
} }
interface SymbolDisplayBuilder { interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@ -1053,7 +1131,7 @@ declare module "typescript" {
Merged = 33554432, Merged = 33554432,
Transient = 67108864, Transient = 67108864,
Prototype = 134217728, Prototype = 134217728,
UnionProperty = 268435456, SyntheticProperty = 268435456,
Optional = 536870912, Optional = 536870912,
ExportStar = 1073741824, ExportStar = 1073741824,
Enum = 384, Enum = 384,
@ -1069,8 +1147,8 @@ declare module "typescript" {
PropertyExcludes = 107455, PropertyExcludes = 107455,
EnumMemberExcludes = 107455, EnumMemberExcludes = 107455,
FunctionExcludes = 106927, FunctionExcludes = 106927,
ClassExcludes = 899583, ClassExcludes = 899519,
InterfaceExcludes = 792992, InterfaceExcludes = 792960,
RegularEnumExcludes = 899327, RegularEnumExcludes = 899327,
ConstEnumExcludes = 899967, ConstEnumExcludes = 899967,
ValueModuleExcludes = 106639, ValueModuleExcludes = 106639,
@ -1116,13 +1194,16 @@ declare module "typescript" {
Reference = 4096, Reference = 4096,
Tuple = 8192, Tuple = 8192,
Union = 16384, Union = 16384,
Anonymous = 32768, Intersection = 32768,
Instantiated = 65536, Anonymous = 65536,
ObjectLiteral = 262144, Instantiated = 131072,
ESSymbol = 2097152, ObjectLiteral = 524288,
ESSymbol = 4194304,
StringLike = 258, StringLike = 258,
NumberLike = 132, NumberLike = 132,
ObjectType = 48128, ObjectType = 80896,
UnionOrIntersection = 49152,
StructuredType = 130048,
} }
interface Type { interface Type {
flags: TypeFlags; flags: TypeFlags;
@ -1157,9 +1238,13 @@ declare module "typescript" {
elementTypes: Type[]; elementTypes: Type[];
baseArrayType: TypeReference; baseArrayType: TypeReference;
} }
interface UnionType extends Type { interface UnionOrIntersectionType extends Type {
types: Type[]; types: Type[];
} }
interface UnionType extends UnionOrIntersectionType {
}
interface IntersectionType extends UnionOrIntersectionType {
}
interface TypeParameter extends Type { interface TypeParameter extends Type {
constraint: Type; constraint: Type;
} }
@ -1216,6 +1301,7 @@ declare module "typescript" {
help?: boolean; help?: boolean;
inlineSourceMap?: boolean; inlineSourceMap?: boolean;
inlineSources?: boolean; inlineSources?: boolean;
jsx?: JsxEmit;
listFiles?: boolean; listFiles?: boolean;
locale?: string; locale?: string;
mapRoot?: string; mapRoot?: string;
@ -1242,6 +1328,7 @@ declare module "typescript" {
watch?: boolean; watch?: boolean;
isolatedModules?: boolean; isolatedModules?: boolean;
experimentalDecorators?: boolean; experimentalDecorators?: boolean;
experimentalAsyncFunctions?: boolean;
emitDecoratorMetadata?: boolean; emitDecoratorMetadata?: boolean;
[option: string]: string | number | boolean; [option: string]: string | number | boolean;
} }
@ -1252,6 +1339,11 @@ declare module "typescript" {
UMD = 3, UMD = 3,
System = 4, System = 4,
} }
const enum JsxEmit {
None = 0,
Preserve = 1,
React = 2,
}
const enum NewLineKind { const enum NewLineKind {
CarriageReturnLineFeed = 0, CarriageReturnLineFeed = 0,
LineFeed = 1, LineFeed = 1,
@ -1266,18 +1358,18 @@ declare module "typescript" {
ES6 = 2, ES6 = 2,
Latest = 2, Latest = 2,
} }
const enum LanguageVariant {
Standard = 0,
JSX = 1,
}
interface ParsedCommandLine { interface ParsedCommandLine {
options: CompilerOptions; options: CompilerOptions;
fileNames: string[]; fileNames: string[];
errors: Diagnostic[]; errors: Diagnostic[];
} }
interface CancellationToken {
isCancellationRequested(): boolean;
}
interface CompilerHost { interface CompilerHost {
getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile;
getDefaultLibFileName(options: CompilerOptions): string; getDefaultLibFileName(options: CompilerOptions): string;
getCancellationToken?(): CancellationToken;
writeFile: WriteFileCallback; writeFile: WriteFileCallback;
getCurrentDirectory(): string; getCurrentDirectory(): string;
getCanonicalFileName(fileName: string): string; getCanonicalFileName(fileName: string): string;
@ -1336,10 +1428,14 @@ declare module "typescript" {
reScanGreaterToken(): SyntaxKind; reScanGreaterToken(): SyntaxKind;
reScanSlashToken(): SyntaxKind; reScanSlashToken(): SyntaxKind;
reScanTemplateToken(): SyntaxKind; reScanTemplateToken(): SyntaxKind;
scanJsxIdentifier(): SyntaxKind;
reScanJsxToken(): SyntaxKind;
scanJsxToken(): SyntaxKind;
scan(): SyntaxKind; scan(): SyntaxKind;
setText(text: string, start?: number, length?: number): void; setText(text: string, start?: number, length?: number): void;
setOnError(onError: ErrorCallback): void; setOnError(onError: ErrorCallback): void;
setScriptTarget(scriptTarget: ScriptTarget): void; setScriptTarget(scriptTarget: ScriptTarget): void;
setLanguageVariant(variant: LanguageVariant): void;
setTextPos(textPos: number): void; setTextPos(textPos: number): void;
lookAhead<T>(callback: () => T): T; lookAhead<T>(callback: () => T): T;
tryScan<T>(callback: () => T): T; tryScan<T>(callback: () => T): T;
@ -1397,7 +1493,7 @@ declare module "typescript" {
const version: string; const version: string;
function findConfigFile(searchPath: string): string; function findConfigFile(searchPath: string): string;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile): Diagnostic[]; function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
} }
@ -1504,6 +1600,9 @@ declare module "typescript" {
importedFiles: FileReference[]; importedFiles: FileReference[];
isLibFile: boolean; isLibFile: boolean;
} }
interface HostCancellationToken {
isCancellationRequested(): boolean;
}
interface LanguageServiceHost { interface LanguageServiceHost {
getCompilationSettings(): CompilerOptions; getCompilationSettings(): CompilerOptions;
getNewLine?(): string; getNewLine?(): string;
@ -1512,7 +1611,7 @@ declare module "typescript" {
getScriptVersion(fileName: string): string; getScriptVersion(fileName: string): string;
getScriptSnapshot(fileName: string): IScriptSnapshot; getScriptSnapshot(fileName: string): IScriptSnapshot;
getLocalizedDiagnosticMessages?(): any; getLocalizedDiagnosticMessages?(): any;
getCancellationToken?(): CancellationToken; getCancellationToken?(): HostCancellationToken;
getCurrentDirectory(): string; getCurrentDirectory(): string;
getDefaultLibFileName(options: CompilerOptions): string; getDefaultLibFileName(options: CompilerOptions): string;
log?(s: string): void; log?(s: string): void;
@ -1892,6 +1991,7 @@ declare module "typescript" {
const scriptElement: string; const scriptElement: string;
const moduleElement: string; const moduleElement: string;
const classElement: string; const classElement: string;
const localClassElement: string;
const interfaceElement: string; const interfaceElement: string;
const typeElement: string; const typeElement: string;
const enumElement: string; const enumElement: string;
@ -1923,6 +2023,7 @@ declare module "typescript" {
const exportedModifier: string; const exportedModifier: string;
const ambientModifier: string; const ambientModifier: string;
const staticModifier: string; const staticModifier: string;
const abstractModifier: string;
} }
class ClassificationTypeNames { class ClassificationTypeNames {
static comment: string; static comment: string;
@ -1968,15 +2069,6 @@ declare module "typescript" {
} }
function displayPartsToString(displayParts: SymbolDisplayPart[]): string; function displayPartsToString(displayParts: SymbolDisplayPart[]): string;
function getDefaultCompilerOptions(): CompilerOptions; function getDefaultCompilerOptions(): CompilerOptions;
class OperationCanceledException {
}
class CancellationTokenObject {
private cancellationToken;
static None: CancellationTokenObject;
constructor(cancellationToken: CancellationToken);
isCancellationRequested(): boolean;
throwIfCancellationRequested(): void;
}
function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string;
function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile;
let disableIncrementalParsing: boolean; let disableIncrementalParsing: boolean;
@ -1986,7 +2078,7 @@ declare module "typescript" {
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService;
function createClassifier(): Classifier; function createClassifier(): Classifier;
/** /**
* Get the path of the default library file (lib.d.ts) as distributed with the typescript * Get the path of the default library files (lib.d.ts) as distributed with the typescript
* node package. * node package.
* The functionality is not supported if the ts module is consumed outside of a node module. * The functionality is not supported if the ts module is consumed outside of a node module.
*/ */

File diff suppressed because it is too large Load diff

View file

@ -54,250 +54,265 @@ declare namespace ts {
SemicolonToken = 22, SemicolonToken = 22,
CommaToken = 23, CommaToken = 23,
LessThanToken = 24, LessThanToken = 24,
GreaterThanToken = 25, LessThanSlashToken = 25,
LessThanEqualsToken = 26, GreaterThanToken = 26,
GreaterThanEqualsToken = 27, LessThanEqualsToken = 27,
EqualsEqualsToken = 28, GreaterThanEqualsToken = 28,
ExclamationEqualsToken = 29, EqualsEqualsToken = 29,
EqualsEqualsEqualsToken = 30, ExclamationEqualsToken = 30,
ExclamationEqualsEqualsToken = 31, EqualsEqualsEqualsToken = 31,
EqualsGreaterThanToken = 32, ExclamationEqualsEqualsToken = 32,
PlusToken = 33, EqualsGreaterThanToken = 33,
MinusToken = 34, PlusToken = 34,
AsteriskToken = 35, MinusToken = 35,
SlashToken = 36, AsteriskToken = 36,
PercentToken = 37, SlashToken = 37,
PlusPlusToken = 38, PercentToken = 38,
MinusMinusToken = 39, PlusPlusToken = 39,
LessThanLessThanToken = 40, MinusMinusToken = 40,
GreaterThanGreaterThanToken = 41, LessThanLessThanToken = 41,
GreaterThanGreaterThanGreaterThanToken = 42, GreaterThanGreaterThanToken = 42,
AmpersandToken = 43, GreaterThanGreaterThanGreaterThanToken = 43,
BarToken = 44, AmpersandToken = 44,
CaretToken = 45, BarToken = 45,
ExclamationToken = 46, CaretToken = 46,
TildeToken = 47, ExclamationToken = 47,
AmpersandAmpersandToken = 48, TildeToken = 48,
BarBarToken = 49, AmpersandAmpersandToken = 49,
QuestionToken = 50, BarBarToken = 50,
ColonToken = 51, QuestionToken = 51,
AtToken = 52, ColonToken = 52,
EqualsToken = 53, AtToken = 53,
PlusEqualsToken = 54, EqualsToken = 54,
MinusEqualsToken = 55, PlusEqualsToken = 55,
AsteriskEqualsToken = 56, MinusEqualsToken = 56,
SlashEqualsToken = 57, AsteriskEqualsToken = 57,
PercentEqualsToken = 58, SlashEqualsToken = 58,
LessThanLessThanEqualsToken = 59, PercentEqualsToken = 59,
GreaterThanGreaterThanEqualsToken = 60, LessThanLessThanEqualsToken = 60,
GreaterThanGreaterThanGreaterThanEqualsToken = 61, GreaterThanGreaterThanEqualsToken = 61,
AmpersandEqualsToken = 62, GreaterThanGreaterThanGreaterThanEqualsToken = 62,
BarEqualsToken = 63, AmpersandEqualsToken = 63,
CaretEqualsToken = 64, BarEqualsToken = 64,
Identifier = 65, CaretEqualsToken = 65,
BreakKeyword = 66, Identifier = 66,
CaseKeyword = 67, BreakKeyword = 67,
CatchKeyword = 68, CaseKeyword = 68,
ClassKeyword = 69, CatchKeyword = 69,
ConstKeyword = 70, ClassKeyword = 70,
ContinueKeyword = 71, ConstKeyword = 71,
DebuggerKeyword = 72, ContinueKeyword = 72,
DefaultKeyword = 73, DebuggerKeyword = 73,
DeleteKeyword = 74, DefaultKeyword = 74,
DoKeyword = 75, DeleteKeyword = 75,
ElseKeyword = 76, DoKeyword = 76,
EnumKeyword = 77, ElseKeyword = 77,
ExportKeyword = 78, EnumKeyword = 78,
ExtendsKeyword = 79, ExportKeyword = 79,
FalseKeyword = 80, ExtendsKeyword = 80,
FinallyKeyword = 81, FalseKeyword = 81,
ForKeyword = 82, FinallyKeyword = 82,
FunctionKeyword = 83, ForKeyword = 83,
IfKeyword = 84, FunctionKeyword = 84,
ImportKeyword = 85, IfKeyword = 85,
InKeyword = 86, ImportKeyword = 86,
InstanceOfKeyword = 87, InKeyword = 87,
NewKeyword = 88, InstanceOfKeyword = 88,
NullKeyword = 89, NewKeyword = 89,
ReturnKeyword = 90, NullKeyword = 90,
SuperKeyword = 91, ReturnKeyword = 91,
SwitchKeyword = 92, SuperKeyword = 92,
ThisKeyword = 93, SwitchKeyword = 93,
ThrowKeyword = 94, ThisKeyword = 94,
TrueKeyword = 95, ThrowKeyword = 95,
TryKeyword = 96, TrueKeyword = 96,
TypeOfKeyword = 97, TryKeyword = 97,
VarKeyword = 98, TypeOfKeyword = 98,
VoidKeyword = 99, VarKeyword = 99,
WhileKeyword = 100, VoidKeyword = 100,
WithKeyword = 101, WhileKeyword = 101,
ImplementsKeyword = 102, WithKeyword = 102,
InterfaceKeyword = 103, ImplementsKeyword = 103,
LetKeyword = 104, InterfaceKeyword = 104,
PackageKeyword = 105, LetKeyword = 105,
PrivateKeyword = 106, PackageKeyword = 106,
ProtectedKeyword = 107, PrivateKeyword = 107,
PublicKeyword = 108, ProtectedKeyword = 108,
StaticKeyword = 109, PublicKeyword = 109,
YieldKeyword = 110, StaticKeyword = 110,
AsKeyword = 111, YieldKeyword = 111,
AnyKeyword = 112, AbstractKeyword = 112,
BooleanKeyword = 113, AsKeyword = 113,
ConstructorKeyword = 114, AnyKeyword = 114,
DeclareKeyword = 115, AsyncKeyword = 115,
GetKeyword = 116, AwaitKeyword = 116,
IsKeyword = 117, BooleanKeyword = 117,
ModuleKeyword = 118, ConstructorKeyword = 118,
NamespaceKeyword = 119, DeclareKeyword = 119,
RequireKeyword = 120, GetKeyword = 120,
NumberKeyword = 121, IsKeyword = 121,
SetKeyword = 122, ModuleKeyword = 122,
StringKeyword = 123, NamespaceKeyword = 123,
SymbolKeyword = 124, RequireKeyword = 124,
TypeKeyword = 125, NumberKeyword = 125,
FromKeyword = 126, SetKeyword = 126,
OfKeyword = 127, StringKeyword = 127,
QualifiedName = 128, SymbolKeyword = 128,
ComputedPropertyName = 129, TypeKeyword = 129,
TypeParameter = 130, FromKeyword = 130,
Parameter = 131, OfKeyword = 131,
Decorator = 132, QualifiedName = 132,
PropertySignature = 133, ComputedPropertyName = 133,
PropertyDeclaration = 134, TypeParameter = 134,
MethodSignature = 135, Parameter = 135,
MethodDeclaration = 136, Decorator = 136,
Constructor = 137, PropertySignature = 137,
GetAccessor = 138, PropertyDeclaration = 138,
SetAccessor = 139, MethodSignature = 139,
CallSignature = 140, MethodDeclaration = 140,
ConstructSignature = 141, Constructor = 141,
IndexSignature = 142, GetAccessor = 142,
TypePredicate = 143, SetAccessor = 143,
TypeReference = 144, CallSignature = 144,
FunctionType = 145, ConstructSignature = 145,
ConstructorType = 146, IndexSignature = 146,
TypeQuery = 147, TypePredicate = 147,
TypeLiteral = 148, TypeReference = 148,
ArrayType = 149, FunctionType = 149,
TupleType = 150, ConstructorType = 150,
UnionType = 151, TypeQuery = 151,
ParenthesizedType = 152, TypeLiteral = 152,
ObjectBindingPattern = 153, ArrayType = 153,
ArrayBindingPattern = 154, TupleType = 154,
BindingElement = 155, UnionType = 155,
ArrayLiteralExpression = 156, IntersectionType = 156,
ObjectLiteralExpression = 157, ParenthesizedType = 157,
PropertyAccessExpression = 158, ObjectBindingPattern = 158,
ElementAccessExpression = 159, ArrayBindingPattern = 159,
CallExpression = 160, BindingElement = 160,
NewExpression = 161, ArrayLiteralExpression = 161,
TaggedTemplateExpression = 162, ObjectLiteralExpression = 162,
TypeAssertionExpression = 163, PropertyAccessExpression = 163,
ParenthesizedExpression = 164, ElementAccessExpression = 164,
FunctionExpression = 165, CallExpression = 165,
ArrowFunction = 166, NewExpression = 166,
DeleteExpression = 167, TaggedTemplateExpression = 167,
TypeOfExpression = 168, TypeAssertionExpression = 168,
VoidExpression = 169, ParenthesizedExpression = 169,
PrefixUnaryExpression = 170, FunctionExpression = 170,
PostfixUnaryExpression = 171, ArrowFunction = 171,
BinaryExpression = 172, DeleteExpression = 172,
ConditionalExpression = 173, TypeOfExpression = 173,
TemplateExpression = 174, VoidExpression = 174,
YieldExpression = 175, AwaitExpression = 175,
SpreadElementExpression = 176, PrefixUnaryExpression = 176,
ClassExpression = 177, PostfixUnaryExpression = 177,
OmittedExpression = 178, BinaryExpression = 178,
ExpressionWithTypeArguments = 179, ConditionalExpression = 179,
TemplateSpan = 180, TemplateExpression = 180,
SemicolonClassElement = 181, YieldExpression = 181,
Block = 182, SpreadElementExpression = 182,
VariableStatement = 183, ClassExpression = 183,
EmptyStatement = 184, OmittedExpression = 184,
ExpressionStatement = 185, ExpressionWithTypeArguments = 185,
IfStatement = 186, AsExpression = 186,
DoStatement = 187, TemplateSpan = 187,
WhileStatement = 188, SemicolonClassElement = 188,
ForStatement = 189, Block = 189,
ForInStatement = 190, VariableStatement = 190,
ForOfStatement = 191, EmptyStatement = 191,
ContinueStatement = 192, ExpressionStatement = 192,
BreakStatement = 193, IfStatement = 193,
ReturnStatement = 194, DoStatement = 194,
WithStatement = 195, WhileStatement = 195,
SwitchStatement = 196, ForStatement = 196,
LabeledStatement = 197, ForInStatement = 197,
ThrowStatement = 198, ForOfStatement = 198,
TryStatement = 199, ContinueStatement = 199,
DebuggerStatement = 200, BreakStatement = 200,
VariableDeclaration = 201, ReturnStatement = 201,
VariableDeclarationList = 202, WithStatement = 202,
FunctionDeclaration = 203, SwitchStatement = 203,
ClassDeclaration = 204, LabeledStatement = 204,
InterfaceDeclaration = 205, ThrowStatement = 205,
TypeAliasDeclaration = 206, TryStatement = 206,
EnumDeclaration = 207, DebuggerStatement = 207,
ModuleDeclaration = 208, VariableDeclaration = 208,
ModuleBlock = 209, VariableDeclarationList = 209,
CaseBlock = 210, FunctionDeclaration = 210,
ImportEqualsDeclaration = 211, ClassDeclaration = 211,
ImportDeclaration = 212, InterfaceDeclaration = 212,
ImportClause = 213, TypeAliasDeclaration = 213,
NamespaceImport = 214, EnumDeclaration = 214,
NamedImports = 215, ModuleDeclaration = 215,
ImportSpecifier = 216, ModuleBlock = 216,
ExportAssignment = 217, CaseBlock = 217,
ExportDeclaration = 218, ImportEqualsDeclaration = 218,
NamedExports = 219, ImportDeclaration = 219,
ExportSpecifier = 220, ImportClause = 220,
MissingDeclaration = 221, NamespaceImport = 221,
ExternalModuleReference = 222, NamedImports = 222,
CaseClause = 223, ImportSpecifier = 223,
DefaultClause = 224, ExportAssignment = 224,
HeritageClause = 225, ExportDeclaration = 225,
CatchClause = 226, NamedExports = 226,
PropertyAssignment = 227, ExportSpecifier = 227,
ShorthandPropertyAssignment = 228, MissingDeclaration = 228,
EnumMember = 229, ExternalModuleReference = 229,
SourceFile = 230, JsxElement = 230,
JSDocTypeExpression = 231, JsxSelfClosingElement = 231,
JSDocAllType = 232, JsxOpeningElement = 232,
JSDocUnknownType = 233, JsxText = 233,
JSDocArrayType = 234, JsxClosingElement = 234,
JSDocUnionType = 235, JsxAttribute = 235,
JSDocTupleType = 236, JsxSpreadAttribute = 236,
JSDocNullableType = 237, JsxExpression = 237,
JSDocNonNullableType = 238, CaseClause = 238,
JSDocRecordType = 239, DefaultClause = 239,
JSDocRecordMember = 240, HeritageClause = 240,
JSDocTypeReference = 241, CatchClause = 241,
JSDocOptionalType = 242, PropertyAssignment = 242,
JSDocFunctionType = 243, ShorthandPropertyAssignment = 243,
JSDocVariadicType = 244, EnumMember = 244,
JSDocConstructorType = 245, SourceFile = 245,
JSDocThisType = 246, JSDocTypeExpression = 246,
JSDocComment = 247, JSDocAllType = 247,
JSDocTag = 248, JSDocUnknownType = 248,
JSDocParameterTag = 249, JSDocArrayType = 249,
JSDocReturnTag = 250, JSDocUnionType = 250,
JSDocTypeTag = 251, JSDocTupleType = 251,
JSDocTemplateTag = 252, JSDocNullableType = 252,
SyntaxList = 253, JSDocNonNullableType = 253,
Count = 254, JSDocRecordType = 254,
FirstAssignment = 53, JSDocRecordMember = 255,
LastAssignment = 64, JSDocTypeReference = 256,
FirstReservedWord = 66, JSDocOptionalType = 257,
LastReservedWord = 101, JSDocFunctionType = 258,
FirstKeyword = 66, JSDocVariadicType = 259,
LastKeyword = 127, JSDocConstructorType = 260,
FirstFutureReservedWord = 102, JSDocThisType = 261,
LastFutureReservedWord = 110, JSDocComment = 262,
FirstTypeNode = 144, JSDocTag = 263,
LastTypeNode = 152, JSDocParameterTag = 264,
JSDocReturnTag = 265,
JSDocTypeTag = 266,
JSDocTemplateTag = 267,
SyntaxList = 268,
Count = 269,
FirstAssignment = 54,
LastAssignment = 65,
FirstReservedWord = 67,
LastReservedWord = 102,
FirstKeyword = 67,
LastKeyword = 131,
FirstFutureReservedWord = 103,
LastFutureReservedWord = 111,
FirstTypeNode = 148,
LastTypeNode = 157,
FirstPunctuation = 14, FirstPunctuation = 14,
LastPunctuation = 64, LastPunctuation = 65,
FirstToken = 0, FirstToken = 0,
LastToken = 127, LastToken = 131,
FirstTriviaToken = 2, FirstTriviaToken = 2,
LastTriviaToken = 6, LastTriviaToken = 6,
FirstLiteralToken = 7, FirstLiteralToken = 7,
@ -305,8 +320,8 @@ declare namespace ts {
FirstTemplateToken = 10, FirstTemplateToken = 10,
LastTemplateToken = 13, LastTemplateToken = 13,
FirstBinaryOperator = 24, FirstBinaryOperator = 24,
LastBinaryOperator = 64, LastBinaryOperator = 65,
FirstNode = 128, FirstNode = 132,
} }
const enum NodeFlags { const enum NodeFlags {
Export = 1, Export = 1,
@ -315,18 +330,28 @@ declare namespace ts {
Private = 32, Private = 32,
Protected = 64, Protected = 64,
Static = 128, Static = 128,
Default = 256, Abstract = 256,
MultiLine = 512, Async = 512,
Synthetic = 1024, Default = 1024,
DeclarationFile = 2048, MultiLine = 2048,
Let = 4096, Synthetic = 4096,
Const = 8192, DeclarationFile = 8192,
OctalLiteral = 16384, Let = 16384,
Namespace = 32768, Const = 32768,
ExportContext = 65536, OctalLiteral = 65536,
Modifier = 499, Namespace = 131072,
ExportContext = 262144,
Modifier = 2035,
AccessibilityModifier = 112, AccessibilityModifier = 112,
BlockScoped = 12288, BlockScoped = 49152,
}
const enum JsxFlags {
None = 0,
IntrinsicNamedElement = 1,
IntrinsicIndexedElement = 2,
ClassElement = 4,
UnknownElement = 8,
IntrinsicElement = 3,
} }
interface Node extends TextRange { interface Node extends TextRange {
kind: SyntaxKind; kind: SyntaxKind;
@ -483,9 +508,13 @@ declare namespace ts {
interface TupleTypeNode extends TypeNode { interface TupleTypeNode extends TypeNode {
elementTypes: NodeArray<TypeNode>; elementTypes: NodeArray<TypeNode>;
} }
interface UnionTypeNode extends TypeNode { interface UnionOrIntersectionTypeNode extends TypeNode {
types: NodeArray<TypeNode>; types: NodeArray<TypeNode>;
} }
interface UnionTypeNode extends UnionOrIntersectionTypeNode {
}
interface IntersectionTypeNode extends UnionOrIntersectionTypeNode {
}
interface ParenthesizedTypeNode extends TypeNode { interface ParenthesizedTypeNode extends TypeNode {
type: TypeNode; type: TypeNode;
} }
@ -528,6 +557,9 @@ declare namespace ts {
interface VoidExpression extends UnaryExpression { interface VoidExpression extends UnaryExpression {
expression: UnaryExpression; expression: UnaryExpression;
} }
interface AwaitExpression extends UnaryExpression {
expression: UnaryExpression;
}
interface YieldExpression extends Expression { interface YieldExpression extends Expression {
asteriskToken?: Node; asteriskToken?: Node;
expression?: Expression; expression?: Expression;
@ -601,10 +633,46 @@ declare namespace ts {
template: LiteralExpression | TemplateExpression; template: LiteralExpression | TemplateExpression;
} }
type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator; type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator;
interface AsExpression extends Expression {
expression: Expression;
type: TypeNode;
}
interface TypeAssertion extends UnaryExpression { interface TypeAssertion extends UnaryExpression {
type: TypeNode; type: TypeNode;
expression: UnaryExpression; expression: UnaryExpression;
} }
type AssertionExpression = TypeAssertion | AsExpression;
interface JsxElement extends PrimaryExpression {
openingElement: JsxOpeningElement;
children: NodeArray<JsxChild>;
closingElement: JsxClosingElement;
}
interface JsxOpeningElement extends Expression {
_openingElementBrand?: any;
tagName: EntityName;
attributes: NodeArray<JsxAttribute | JsxSpreadAttribute>;
}
interface JsxSelfClosingElement extends PrimaryExpression, JsxOpeningElement {
_selfClosingElementBrand?: any;
}
type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
interface JsxAttribute extends Node {
name: Identifier;
initializer?: Expression;
}
interface JsxSpreadAttribute extends Node {
expression: Expression;
}
interface JsxClosingElement extends Node {
tagName: EntityName;
}
interface JsxExpression extends Expression {
expression?: Expression;
}
interface JsxText extends Node {
_jsxTextExpressionBrand: any;
}
type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement;
interface Statement extends Node { interface Statement extends Node {
_statementBrand: any; _statementBrand: any;
} }
@ -859,6 +927,7 @@ declare namespace ts {
}[]; }[];
moduleName: string; moduleName: string;
referencedFiles: FileReference[]; referencedFiles: FileReference[];
languageVariant: LanguageVariant;
/** /**
* lib.d.ts should have a reference comment like * lib.d.ts should have a reference comment like
* *
@ -881,6 +950,13 @@ declare namespace ts {
interface WriteFileCallback { interface WriteFileCallback {
(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void;
} }
class OperationCanceledException {
}
interface CancellationToken {
isCancellationRequested(): boolean;
/** @throws OperationCanceledException if isCancellationRequested is true */
throwIfCancellationRequested(): void;
}
interface Program extends ScriptReferenceHost { interface Program extends ScriptReferenceHost {
/** /**
* Get a list of files in the program * Get a list of files in the program
@ -896,12 +972,12 @@ declare namespace ts {
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
* will be invoked when writing the JavaScript and declaration files. * will be invoked when writing the JavaScript and declaration files.
*/ */
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult;
getOptionsDiagnostics(): Diagnostic[]; getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getGlobalDiagnostics(): Diagnostic[]; getGlobalDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
getSemanticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
getDeclarationDiagnostics(sourceFile?: SourceFile): Diagnostic[]; getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
/** /**
* Gets a type checker that can be used to semantically analyze source fils in the program. * Gets a type checker that can be used to semantically analyze source fils in the program.
*/ */
@ -976,6 +1052,8 @@ declare namespace ts {
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
getAliasedSymbol(symbol: Symbol): Symbol; getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfModule(moduleSymbol: Symbol): Symbol[]; getExportsOfModule(moduleSymbol: Symbol): Symbol[];
getJsxElementAttributesType(elementNode: JsxOpeningLikeElement): Type;
getJsxIntrinsicTagNames(): Symbol[];
} }
interface SymbolDisplayBuilder { interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@ -1053,7 +1131,7 @@ declare namespace ts {
Merged = 33554432, Merged = 33554432,
Transient = 67108864, Transient = 67108864,
Prototype = 134217728, Prototype = 134217728,
UnionProperty = 268435456, SyntheticProperty = 268435456,
Optional = 536870912, Optional = 536870912,
ExportStar = 1073741824, ExportStar = 1073741824,
Enum = 384, Enum = 384,
@ -1069,8 +1147,8 @@ declare namespace ts {
PropertyExcludes = 107455, PropertyExcludes = 107455,
EnumMemberExcludes = 107455, EnumMemberExcludes = 107455,
FunctionExcludes = 106927, FunctionExcludes = 106927,
ClassExcludes = 899583, ClassExcludes = 899519,
InterfaceExcludes = 792992, InterfaceExcludes = 792960,
RegularEnumExcludes = 899327, RegularEnumExcludes = 899327,
ConstEnumExcludes = 899967, ConstEnumExcludes = 899967,
ValueModuleExcludes = 106639, ValueModuleExcludes = 106639,
@ -1116,13 +1194,16 @@ declare namespace ts {
Reference = 4096, Reference = 4096,
Tuple = 8192, Tuple = 8192,
Union = 16384, Union = 16384,
Anonymous = 32768, Intersection = 32768,
Instantiated = 65536, Anonymous = 65536,
ObjectLiteral = 262144, Instantiated = 131072,
ESSymbol = 2097152, ObjectLiteral = 524288,
ESSymbol = 4194304,
StringLike = 258, StringLike = 258,
NumberLike = 132, NumberLike = 132,
ObjectType = 48128, ObjectType = 80896,
UnionOrIntersection = 49152,
StructuredType = 130048,
} }
interface Type { interface Type {
flags: TypeFlags; flags: TypeFlags;
@ -1157,9 +1238,13 @@ declare namespace ts {
elementTypes: Type[]; elementTypes: Type[];
baseArrayType: TypeReference; baseArrayType: TypeReference;
} }
interface UnionType extends Type { interface UnionOrIntersectionType extends Type {
types: Type[]; types: Type[];
} }
interface UnionType extends UnionOrIntersectionType {
}
interface IntersectionType extends UnionOrIntersectionType {
}
interface TypeParameter extends Type { interface TypeParameter extends Type {
constraint: Type; constraint: Type;
} }
@ -1216,6 +1301,7 @@ declare namespace ts {
help?: boolean; help?: boolean;
inlineSourceMap?: boolean; inlineSourceMap?: boolean;
inlineSources?: boolean; inlineSources?: boolean;
jsx?: JsxEmit;
listFiles?: boolean; listFiles?: boolean;
locale?: string; locale?: string;
mapRoot?: string; mapRoot?: string;
@ -1242,6 +1328,7 @@ declare namespace ts {
watch?: boolean; watch?: boolean;
isolatedModules?: boolean; isolatedModules?: boolean;
experimentalDecorators?: boolean; experimentalDecorators?: boolean;
experimentalAsyncFunctions?: boolean;
emitDecoratorMetadata?: boolean; emitDecoratorMetadata?: boolean;
[option: string]: string | number | boolean; [option: string]: string | number | boolean;
} }
@ -1252,6 +1339,11 @@ declare namespace ts {
UMD = 3, UMD = 3,
System = 4, System = 4,
} }
const enum JsxEmit {
None = 0,
Preserve = 1,
React = 2,
}
const enum NewLineKind { const enum NewLineKind {
CarriageReturnLineFeed = 0, CarriageReturnLineFeed = 0,
LineFeed = 1, LineFeed = 1,
@ -1266,18 +1358,18 @@ declare namespace ts {
ES6 = 2, ES6 = 2,
Latest = 2, Latest = 2,
} }
const enum LanguageVariant {
Standard = 0,
JSX = 1,
}
interface ParsedCommandLine { interface ParsedCommandLine {
options: CompilerOptions; options: CompilerOptions;
fileNames: string[]; fileNames: string[];
errors: Diagnostic[]; errors: Diagnostic[];
} }
interface CancellationToken {
isCancellationRequested(): boolean;
}
interface CompilerHost { interface CompilerHost {
getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile;
getDefaultLibFileName(options: CompilerOptions): string; getDefaultLibFileName(options: CompilerOptions): string;
getCancellationToken?(): CancellationToken;
writeFile: WriteFileCallback; writeFile: WriteFileCallback;
getCurrentDirectory(): string; getCurrentDirectory(): string;
getCanonicalFileName(fileName: string): string; getCanonicalFileName(fileName: string): string;
@ -1336,10 +1428,14 @@ declare namespace ts {
reScanGreaterToken(): SyntaxKind; reScanGreaterToken(): SyntaxKind;
reScanSlashToken(): SyntaxKind; reScanSlashToken(): SyntaxKind;
reScanTemplateToken(): SyntaxKind; reScanTemplateToken(): SyntaxKind;
scanJsxIdentifier(): SyntaxKind;
reScanJsxToken(): SyntaxKind;
scanJsxToken(): SyntaxKind;
scan(): SyntaxKind; scan(): SyntaxKind;
setText(text: string, start?: number, length?: number): void; setText(text: string, start?: number, length?: number): void;
setOnError(onError: ErrorCallback): void; setOnError(onError: ErrorCallback): void;
setScriptTarget(scriptTarget: ScriptTarget): void; setScriptTarget(scriptTarget: ScriptTarget): void;
setLanguageVariant(variant: LanguageVariant): void;
setTextPos(textPos: number): void; setTextPos(textPos: number): void;
lookAhead<T>(callback: () => T): T; lookAhead<T>(callback: () => T): T;
tryScan<T>(callback: () => T): T; tryScan<T>(callback: () => T): T;
@ -1397,7 +1493,7 @@ declare namespace ts {
const version: string; const version: string;
function findConfigFile(searchPath: string): string; function findConfigFile(searchPath: string): string;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile): Diagnostic[]; function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
} }
@ -1504,6 +1600,9 @@ declare namespace ts {
importedFiles: FileReference[]; importedFiles: FileReference[];
isLibFile: boolean; isLibFile: boolean;
} }
interface HostCancellationToken {
isCancellationRequested(): boolean;
}
interface LanguageServiceHost { interface LanguageServiceHost {
getCompilationSettings(): CompilerOptions; getCompilationSettings(): CompilerOptions;
getNewLine?(): string; getNewLine?(): string;
@ -1512,7 +1611,7 @@ declare namespace ts {
getScriptVersion(fileName: string): string; getScriptVersion(fileName: string): string;
getScriptSnapshot(fileName: string): IScriptSnapshot; getScriptSnapshot(fileName: string): IScriptSnapshot;
getLocalizedDiagnosticMessages?(): any; getLocalizedDiagnosticMessages?(): any;
getCancellationToken?(): CancellationToken; getCancellationToken?(): HostCancellationToken;
getCurrentDirectory(): string; getCurrentDirectory(): string;
getDefaultLibFileName(options: CompilerOptions): string; getDefaultLibFileName(options: CompilerOptions): string;
log?(s: string): void; log?(s: string): void;
@ -1892,6 +1991,7 @@ declare namespace ts {
const scriptElement: string; const scriptElement: string;
const moduleElement: string; const moduleElement: string;
const classElement: string; const classElement: string;
const localClassElement: string;
const interfaceElement: string; const interfaceElement: string;
const typeElement: string; const typeElement: string;
const enumElement: string; const enumElement: string;
@ -1923,6 +2023,7 @@ declare namespace ts {
const exportedModifier: string; const exportedModifier: string;
const ambientModifier: string; const ambientModifier: string;
const staticModifier: string; const staticModifier: string;
const abstractModifier: string;
} }
class ClassificationTypeNames { class ClassificationTypeNames {
static comment: string; static comment: string;
@ -1968,15 +2069,6 @@ declare namespace ts {
} }
function displayPartsToString(displayParts: SymbolDisplayPart[]): string; function displayPartsToString(displayParts: SymbolDisplayPart[]): string;
function getDefaultCompilerOptions(): CompilerOptions; function getDefaultCompilerOptions(): CompilerOptions;
class OperationCanceledException {
}
class CancellationTokenObject {
private cancellationToken;
static None: CancellationTokenObject;
constructor(cancellationToken: CancellationToken);
isCancellationRequested(): boolean;
throwIfCancellationRequested(): void;
}
function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string;
function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile;
let disableIncrementalParsing: boolean; let disableIncrementalParsing: boolean;
@ -1986,7 +2078,7 @@ declare namespace ts {
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService;
function createClassifier(): Classifier; function createClassifier(): Classifier;
/** /**
* Get the path of the default library file (lib.d.ts) as distributed with the typescript * Get the path of the default library files (lib.d.ts) as distributed with the typescript
* node package. * node package.
* The functionality is not supported if the ts module is consumed outside of a node module. * The functionality is not supported if the ts module is consumed outside of a node module.
*/ */

File diff suppressed because it is too large Load diff