Update LKG

This commit is contained in:
Mohamed Hegazy 2015-08-21 15:20:08 -07:00
parent ea1512e466
commit f9c3adeae0
12 changed files with 36957 additions and 32833 deletions

2665
lib/lib.core.d.ts vendored

File diff suppressed because it is too large Load Diff

5348
lib/lib.core.es6.d.ts vendored

File diff suppressed because it is too large Load Diff

475
lib/lib.d.ts vendored
View File

@ -331,31 +331,31 @@ interface String {
/**
* Replaces text in a string, using a regular expression or search string.
* @param searchValue A String object or string literal that represents the regular expression
* @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
* @param searchValue A string that represents the regular expression.
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
*/
replace(searchValue: string, replaceValue: string): string;
/**
* Replaces text in a string, using a regular expression or search string.
* @param searchValue A String object or string literal that represents the regular expression
* @param replaceValue A function that returns the replacement text.
* @param searchValue A string that represents the regular expression.
* @param replacer A function that returns the replacement text.
*/
replace(searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string;
replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;
/**
* Replaces text in a string, using a regular expression or search string.
* @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
* @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
* @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
*/
replace(searchValue: RegExp, replaceValue: string): string;
/**
* Replaces text in a string, using a regular expression or search string.
* @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
* @param replaceValue A function that returns the replacement text.
* @param replacer A function that returns the replacement text.
*/
replace(searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string;
replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string;
/**
* Finds the first substring match in a regular expression search.
@ -986,14 +986,14 @@ interface JSON {
* @param replacer A function that transforms the results.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
stringify(value: any, replacer: (key: string, value: any) => any, space: any): string;
stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer Array that transforms the results.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
stringify(value: any, replacer: any[], space: any): string;
stringify(value: any, replacer: any[], space: string | number): string;
}
/**
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
@ -1196,11 +1196,13 @@ interface PromiseLike<T> {
*/
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>;
}
}
interface ArrayLike<T> {
length: number;
[n: number]: T;
}
/////////////////////////////
/// IE10 ECMAScript Extensions
/////////////////////////////
/**
* Represents a raw buffer of binary data, which is used to store data for the
@ -1253,14 +1255,14 @@ interface DataView {
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getFloat32(byteOffset: number, littleEndian: boolean): number;
getFloat32(byteOffset: number, littleEndian?: boolean): number;
/**
* Gets the Float64 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getFloat64(byteOffset: number, littleEndian: boolean): number;
getFloat64(byteOffset: number, littleEndian?: boolean): number;
/**
* Gets the Int8 value at the specified byte offset from the start of the view. There is
@ -1274,13 +1276,13 @@ interface DataView {
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getInt16(byteOffset: number, littleEndian: boolean): number;
getInt16(byteOffset: number, littleEndian?: boolean): number;
/**
* Gets the Int32 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getInt32(byteOffset: number, littleEndian: boolean): number;
getInt32(byteOffset: number, littleEndian?: boolean): number;
/**
* Gets the Uint8 value at the specified byte offset from the start of the view. There is
@ -1294,14 +1296,14 @@ interface DataView {
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getUint16(byteOffset: number, littleEndian: boolean): number;
getUint16(byteOffset: number, littleEndian?: boolean): number;
/**
* Gets the Uint32 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getUint32(byteOffset: number, littleEndian: boolean): number;
getUint32(byteOffset: number, littleEndian?: boolean): number;
/**
* Stores an Float32 value at the specified byte offset from the start of the view.
@ -1310,7 +1312,7 @@ interface DataView {
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setFloat32(byteOffset: number, value: number, littleEndian: boolean): void;
setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
* Stores an Float64 value at the specified byte offset from the start of the view.
@ -1319,7 +1321,7 @@ interface DataView {
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setFloat64(byteOffset: number, value: number, littleEndian: boolean): void;
setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
* Stores an Int8 value at the specified byte offset from the start of the view.
@ -1335,7 +1337,7 @@ interface DataView {
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setInt16(byteOffset: number, value: number, littleEndian: boolean): void;
setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
* Stores an Int32 value at the specified byte offset from the start of the view.
@ -1344,7 +1346,7 @@ interface DataView {
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setInt32(byteOffset: number, value: number, littleEndian: boolean): void;
setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
* Stores an Uint8 value at the specified byte offset from the start of the view.
@ -1360,7 +1362,7 @@ interface DataView {
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setUint16(byteOffset: number, value: number, littleEndian: boolean): void;
setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
* Stores an Uint32 value at the specified byte offset from the start of the view.
@ -1369,7 +1371,7 @@ interface DataView {
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setUint32(byteOffset: number, value: number, littleEndian: boolean): void;
setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
}
interface DataViewConstructor {
@ -1576,7 +1578,7 @@ interface Int8Array {
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: Int8Array, offset?: number): void;
set(array: ArrayLike<number>, offset?: number): void;
/**
* Returns a section of an array.
@ -1625,8 +1627,7 @@ interface Int8Array {
interface Int8ArrayConstructor {
prototype: Int8Array;
new (length: number): Int8Array;
new (array: Int8Array): Int8Array;
new (array: number[]): Int8Array;
new (array: ArrayLike<number>): Int8Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
/**
@ -1639,6 +1640,15 @@ interface Int8ArrayConstructor {
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Int8Array;
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
}
declare var Int8Array: Int8ArrayConstructor;
@ -1841,7 +1851,7 @@ interface Uint8Array {
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: Uint8Array, offset?: number): void;
set(array: ArrayLike<number>, offset?: number): void;
/**
* Returns a section of an array.
@ -1891,8 +1901,7 @@ interface Uint8Array {
interface Uint8ArrayConstructor {
prototype: Uint8Array;
new (length: number): Uint8Array;
new (array: Uint8Array): Uint8Array;
new (array: number[]): Uint8Array;
new (array: ArrayLike<number>): Uint8Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
/**
@ -1905,9 +1914,291 @@ interface Uint8ArrayConstructor {
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Uint8Array;
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
}
declare var Uint8Array: Uint8ArrayConstructor;
/**
* A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
* If the requested number of bytes could not be allocated an exception is raised.
*/
interface Uint8ClampedArray {
/**
* The size in bytes of each element in the array.
*/
BYTES_PER_ELEMENT: number;
/**
* The ArrayBuffer instance referenced by the array.
*/
buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
byteLength: number;
/**
* The offset in bytes of the array.
*/
byteOffset: number;
/**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): Uint8ClampedArray;
/**
* Determines whether all the members of an array satisfy the specified test.
* @param callbackfn A function that accepts up to three arguments. The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
fill(value: number, start?: number, end?: number): Uint8ClampedArray;
/**
* Returns the elements of an array that meet the condition specified in a callback function.
* @param callbackfn A function that accepts up to three arguments. The filter method calls
* the callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): Uint8ClampedArray;
/**
* Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
* @param callbackfn A function that accepts up to three arguments. forEach calls the
* callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
/**
* Returns the index of the first occurrence of a value in an array.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
indexOf(searchElement: number, fromIndex?: number): number;
/**
* Adds all the elements of an array separated by the specified separator string.
* @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
/**
* The length of the array.
*/
length: number;
/**
* Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
* @param callbackfn A function that accepts up to three arguments. The map method calls the
* callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
/**
* Calls the specified callback function for all the elements in an array. The return value of
* the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
* @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
/**
* Calls the specified callback function for all the elements in an array. The return value of
* the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
* @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
/**
* Calls the specified callback function for all the elements in an array, in descending order.
* The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
* the callbackfn function one time for each element in the array.
* @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
/**
* Calls the specified callback function for all the elements in an array, in descending order.
* The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
* the callbackfn function one time for each element in the array.
* @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
/**
* Reverses the elements in an Array.
*/
reverse(): Uint8ClampedArray;
/**
* Sets a value or an array of values.
* @param index The index of the location to set.
* @param value The value to set.
*/
set(index: number, value: number): void;
/**
* Sets a value or an array of values.
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: Uint8ClampedArray, offset?: number): void;
/**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
*/
slice(start?: number, end?: number): Uint8ClampedArray;
/**
* Determines whether the specified callback function returns true for any element of an array.
* @param callbackfn A function that accepts up to three arguments. The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
* @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
sort(compareFn?: (a: number, b: number) => number): Uint8ClampedArray;
/**
* Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
* at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Uint8ClampedArray;
/**
* Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
/**
* Returns a string representation of an array.
*/
toString(): string;
[index: number]: number;
}
interface Uint8ClampedArrayConstructor {
prototype: Uint8ClampedArray;
new (length: number): Uint8ClampedArray;
new (array: ArrayLike<number>): Uint8ClampedArray;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
/**
* The size in bytes of each element in the array.
*/
BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Uint8ClampedArray;
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
}
declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
/**
* A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
* requested number of bytes could not be allocated an exception is raised.
@ -2107,7 +2398,7 @@ interface Int16Array {
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: Int16Array, offset?: number): void;
set(array: ArrayLike<number>, offset?: number): void;
/**
* Returns a section of an array.
@ -2157,8 +2448,7 @@ interface Int16Array {
interface Int16ArrayConstructor {
prototype: Int16Array;
new (length: number): Int16Array;
new (array: Int16Array): Int16Array;
new (array: number[]): Int16Array;
new (array: ArrayLike<number>): Int16Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
/**
@ -2171,6 +2461,15 @@ interface Int16ArrayConstructor {
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Int16Array;
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
}
declare var Int16Array: Int16ArrayConstructor;
@ -2373,7 +2672,7 @@ interface Uint16Array {
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: Uint16Array, offset?: number): void;
set(array: ArrayLike<number>, offset?: number): void;
/**
* Returns a section of an array.
@ -2423,8 +2722,7 @@ interface Uint16Array {
interface Uint16ArrayConstructor {
prototype: Uint16Array;
new (length: number): Uint16Array;
new (array: Uint16Array): Uint16Array;
new (array: number[]): Uint16Array;
new (array: ArrayLike<number>): Uint16Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
/**
@ -2437,6 +2735,15 @@ interface Uint16ArrayConstructor {
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Uint16Array;
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
}
declare var Uint16Array: Uint16ArrayConstructor;
/**
@ -2638,7 +2945,7 @@ interface Int32Array {
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: Int32Array, offset?: number): void;
set(array: ArrayLike<number>, offset?: number): void;
/**
* Returns a section of an array.
@ -2688,8 +2995,7 @@ interface Int32Array {
interface Int32ArrayConstructor {
prototype: Int32Array;
new (length: number): Int32Array;
new (array: Int32Array): Int32Array;
new (array: number[]): Int32Array;
new (array: ArrayLike<number>): Int32Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
/**
@ -2702,6 +3008,14 @@ interface Int32ArrayConstructor {
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Int32Array;
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
}
declare var Int32Array: Int32ArrayConstructor;
@ -2904,7 +3218,7 @@ interface Uint32Array {
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: Uint32Array, offset?: number): void;
set(array: ArrayLike<number>, offset?: number): void;
/**
* Returns a section of an array.
@ -2954,8 +3268,7 @@ interface Uint32Array {
interface Uint32ArrayConstructor {
prototype: Uint32Array;
new (length: number): Uint32Array;
new (array: Uint32Array): Uint32Array;
new (array: number[]): Uint32Array;
new (array: ArrayLike<number>): Uint32Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
/**
@ -2968,6 +3281,14 @@ interface Uint32ArrayConstructor {
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Uint32Array;
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
}
declare var Uint32Array: Uint32ArrayConstructor;
@ -3170,7 +3491,7 @@ interface Float32Array {
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: Float32Array, offset?: number): void;
set(array: ArrayLike<number>, offset?: number): void;
/**
* Returns a section of an array.
@ -3220,8 +3541,7 @@ interface Float32Array {
interface Float32ArrayConstructor {
prototype: Float32Array;
new (length: number): Float32Array;
new (array: Float32Array): Float32Array;
new (array: number[]): Float32Array;
new (array: ArrayLike<number>): Float32Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
/**
@ -3234,6 +3554,15 @@ interface Float32ArrayConstructor {
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Float32Array;
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
}
declare var Float32Array: Float32ArrayConstructor;
@ -3436,7 +3765,7 @@ interface Float64Array {
* @param array A typed or untyped array of values to set.
* @param offset The index in the current array at which the values are to be written.
*/
set(array: Float64Array, offset?: number): void;
set(array: ArrayLike<number>, offset?: number): void;
/**
* Returns a section of an array.
@ -3486,8 +3815,7 @@ interface Float64Array {
interface Float64ArrayConstructor {
prototype: Float64Array;
new (length: number): Float64Array;
new (array: Float64Array): Float64Array;
new (array: number[]): Float64Array;
new (array: ArrayLike<number>): Float64Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
/**
@ -3500,8 +3828,17 @@ interface Float64ArrayConstructor {
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Float64Array;
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
}
declare var Float64Array: Float64ArrayConstructor;/////////////////////////////
declare var Float64Array: Float64ArrayConstructor;
/////////////////////////////
/// ECMAScript Internationalization API
/////////////////////////////
@ -6135,7 +6472,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
* @param replace Specifies whether the existing entry for the document is replaced in the history list.
*/
open(url?: string, name?: string, features?: string, replace?: boolean): Document | Window;
open(url?: string, name?: string, features?: string, replace?: boolean): Document;
/**
* Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
* @param commandId Specifies a command identifier.
@ -6706,7 +7043,7 @@ interface File extends Blob {
declare var File: {
prototype: File;
new(): File;
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
}
interface FileList {
@ -10541,7 +10878,7 @@ interface IDBDatabase extends EventTarget {
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
deleteObjectStore(name: string): void;
transaction(storeNames: any, mode?: string): IDBTransaction;
addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -10662,7 +10999,7 @@ interface IDBTransaction extends EventTarget {
READ_ONLY: string;
READ_WRITE: string;
VERSION_CHANGE: string;
addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
@ -10692,11 +11029,14 @@ interface ImageData {
width: number;
}
declare var ImageData: {
interface ImageDataConstructor {
prototype: ImageData;
new(): ImageData;
new(width: number, height: number): ImageData;
new(array: Uint8ClampedArray, width: number, height: number): ImageData;
}
declare var ImageData: ImageDataConstructor;
interface KeyboardEvent extends UIEvent {
altKey: boolean;
char: string;
@ -15638,7 +15978,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
onvolumechange: (ev: Event) => any;
onwaiting: (ev: Event) => any;
opener: Window;
orientation: string;
orientation: string | number;
outerHeight: number;
outerWidth: number;
pageXOffset: number;
@ -15845,7 +16185,7 @@ interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
LOADING: number;
OPENED: number;
UNSENT: number;
addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
@ -16115,7 +16455,7 @@ interface MSBaseReader {
DONE: number;
EMPTY: number;
LOADING: number;
addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
@ -16271,7 +16611,7 @@ interface XMLHttpRequestEventTarget {
onloadstart: (ev: Event) => any;
onprogress: (ev: ProgressEvent) => any;
ontimeout: (ev: ProgressEvent) => any;
addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
@ -16288,11 +16628,17 @@ interface NodeListOf<TNode extends Node> extends NodeList {
[index: number]: TNode;
}
interface BlobPropertyBag {
type?: string;
endings?: string;
}
interface FilePropertyBag {
type?: string;
lastModified?: number;
}
interface EventListenerObject {
handleEvent(evt: Event): void;
}
@ -16453,7 +16799,7 @@ declare var onunload: (ev: Event) => any;
declare var onvolumechange: (ev: Event) => any;
declare var onwaiting: (ev: Event) => any;
declare var opener: Window;
declare var orientation: string;
declare var orientation: string | number;
declare var outerHeight: number;
declare var outerWidth: number;
declare var pageXOffset: number;
@ -16628,7 +16974,8 @@ 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: "waiting", listener: (ev: Event) => 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
/////////////////////////////

2337
lib/lib.dom.d.ts vendored

File diff suppressed because it is too large Load Diff

5384
lib/lib.es6.d.ts vendored

File diff suppressed because it is too large Load Diff

2450
lib/lib.webworker.d.ts vendored

File diff suppressed because it is too large Load Diff

9082
lib/tsc.js

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

638
lib/typescript.d.ts vendored
View File

@ -23,6 +23,7 @@ declare module "typescript" {
contains(fileName: string): boolean;
remove(fileName: string): void;
forEachValue(f: (v: T) => void): void;
clear(): void;
}
interface TextRange {
pos: number;
@ -35,293 +36,294 @@ declare module "typescript" {
MultiLineCommentTrivia = 3,
NewLineTrivia = 4,
WhitespaceTrivia = 5,
ConflictMarkerTrivia = 6,
NumericLiteral = 7,
StringLiteral = 8,
RegularExpressionLiteral = 9,
NoSubstitutionTemplateLiteral = 10,
TemplateHead = 11,
TemplateMiddle = 12,
TemplateTail = 13,
OpenBraceToken = 14,
CloseBraceToken = 15,
OpenParenToken = 16,
CloseParenToken = 17,
OpenBracketToken = 18,
CloseBracketToken = 19,
DotToken = 20,
DotDotDotToken = 21,
SemicolonToken = 22,
CommaToken = 23,
LessThanToken = 24,
LessThanSlashToken = 25,
GreaterThanToken = 26,
LessThanEqualsToken = 27,
GreaterThanEqualsToken = 28,
EqualsEqualsToken = 29,
ExclamationEqualsToken = 30,
EqualsEqualsEqualsToken = 31,
ExclamationEqualsEqualsToken = 32,
EqualsGreaterThanToken = 33,
PlusToken = 34,
MinusToken = 35,
AsteriskToken = 36,
SlashToken = 37,
PercentToken = 38,
PlusPlusToken = 39,
MinusMinusToken = 40,
LessThanLessThanToken = 41,
GreaterThanGreaterThanToken = 42,
GreaterThanGreaterThanGreaterThanToken = 43,
AmpersandToken = 44,
BarToken = 45,
CaretToken = 46,
ExclamationToken = 47,
TildeToken = 48,
AmpersandAmpersandToken = 49,
BarBarToken = 50,
QuestionToken = 51,
ColonToken = 52,
AtToken = 53,
EqualsToken = 54,
PlusEqualsToken = 55,
MinusEqualsToken = 56,
AsteriskEqualsToken = 57,
SlashEqualsToken = 58,
PercentEqualsToken = 59,
LessThanLessThanEqualsToken = 60,
GreaterThanGreaterThanEqualsToken = 61,
GreaterThanGreaterThanGreaterThanEqualsToken = 62,
AmpersandEqualsToken = 63,
BarEqualsToken = 64,
CaretEqualsToken = 65,
Identifier = 66,
BreakKeyword = 67,
CaseKeyword = 68,
CatchKeyword = 69,
ClassKeyword = 70,
ConstKeyword = 71,
ContinueKeyword = 72,
DebuggerKeyword = 73,
DefaultKeyword = 74,
DeleteKeyword = 75,
DoKeyword = 76,
ElseKeyword = 77,
EnumKeyword = 78,
ExportKeyword = 79,
ExtendsKeyword = 80,
FalseKeyword = 81,
FinallyKeyword = 82,
ForKeyword = 83,
FunctionKeyword = 84,
IfKeyword = 85,
ImportKeyword = 86,
InKeyword = 87,
InstanceOfKeyword = 88,
NewKeyword = 89,
NullKeyword = 90,
ReturnKeyword = 91,
SuperKeyword = 92,
SwitchKeyword = 93,
ThisKeyword = 94,
ThrowKeyword = 95,
TrueKeyword = 96,
TryKeyword = 97,
TypeOfKeyword = 98,
VarKeyword = 99,
VoidKeyword = 100,
WhileKeyword = 101,
WithKeyword = 102,
ImplementsKeyword = 103,
InterfaceKeyword = 104,
LetKeyword = 105,
PackageKeyword = 106,
PrivateKeyword = 107,
ProtectedKeyword = 108,
PublicKeyword = 109,
StaticKeyword = 110,
YieldKeyword = 111,
AbstractKeyword = 112,
AsKeyword = 113,
AnyKeyword = 114,
AsyncKeyword = 115,
AwaitKeyword = 116,
BooleanKeyword = 117,
ConstructorKeyword = 118,
DeclareKeyword = 119,
GetKeyword = 120,
IsKeyword = 121,
ModuleKeyword = 122,
NamespaceKeyword = 123,
RequireKeyword = 124,
NumberKeyword = 125,
SetKeyword = 126,
StringKeyword = 127,
SymbolKeyword = 128,
TypeKeyword = 129,
FromKeyword = 130,
OfKeyword = 131,
QualifiedName = 132,
ComputedPropertyName = 133,
TypeParameter = 134,
Parameter = 135,
Decorator = 136,
PropertySignature = 137,
PropertyDeclaration = 138,
MethodSignature = 139,
MethodDeclaration = 140,
Constructor = 141,
GetAccessor = 142,
SetAccessor = 143,
CallSignature = 144,
ConstructSignature = 145,
IndexSignature = 146,
TypePredicate = 147,
TypeReference = 148,
FunctionType = 149,
ConstructorType = 150,
TypeQuery = 151,
TypeLiteral = 152,
ArrayType = 153,
TupleType = 154,
UnionType = 155,
IntersectionType = 156,
ParenthesizedType = 157,
ObjectBindingPattern = 158,
ArrayBindingPattern = 159,
BindingElement = 160,
ArrayLiteralExpression = 161,
ObjectLiteralExpression = 162,
PropertyAccessExpression = 163,
ElementAccessExpression = 164,
CallExpression = 165,
NewExpression = 166,
TaggedTemplateExpression = 167,
TypeAssertionExpression = 168,
ParenthesizedExpression = 169,
FunctionExpression = 170,
ArrowFunction = 171,
DeleteExpression = 172,
TypeOfExpression = 173,
VoidExpression = 174,
AwaitExpression = 175,
PrefixUnaryExpression = 176,
PostfixUnaryExpression = 177,
BinaryExpression = 178,
ConditionalExpression = 179,
TemplateExpression = 180,
YieldExpression = 181,
SpreadElementExpression = 182,
ClassExpression = 183,
OmittedExpression = 184,
ExpressionWithTypeArguments = 185,
AsExpression = 186,
TemplateSpan = 187,
SemicolonClassElement = 188,
Block = 189,
VariableStatement = 190,
EmptyStatement = 191,
ExpressionStatement = 192,
IfStatement = 193,
DoStatement = 194,
WhileStatement = 195,
ForStatement = 196,
ForInStatement = 197,
ForOfStatement = 198,
ContinueStatement = 199,
BreakStatement = 200,
ReturnStatement = 201,
WithStatement = 202,
SwitchStatement = 203,
LabeledStatement = 204,
ThrowStatement = 205,
TryStatement = 206,
DebuggerStatement = 207,
VariableDeclaration = 208,
VariableDeclarationList = 209,
FunctionDeclaration = 210,
ClassDeclaration = 211,
InterfaceDeclaration = 212,
TypeAliasDeclaration = 213,
EnumDeclaration = 214,
ModuleDeclaration = 215,
ModuleBlock = 216,
CaseBlock = 217,
ImportEqualsDeclaration = 218,
ImportDeclaration = 219,
ImportClause = 220,
NamespaceImport = 221,
NamedImports = 222,
ImportSpecifier = 223,
ExportAssignment = 224,
ExportDeclaration = 225,
NamedExports = 226,
ExportSpecifier = 227,
MissingDeclaration = 228,
ExternalModuleReference = 229,
JsxElement = 230,
JsxSelfClosingElement = 231,
JsxOpeningElement = 232,
JsxText = 233,
JsxClosingElement = 234,
JsxAttribute = 235,
JsxSpreadAttribute = 236,
JsxExpression = 237,
CaseClause = 238,
DefaultClause = 239,
HeritageClause = 240,
CatchClause = 241,
PropertyAssignment = 242,
ShorthandPropertyAssignment = 243,
EnumMember = 244,
SourceFile = 245,
JSDocTypeExpression = 246,
JSDocAllType = 247,
JSDocUnknownType = 248,
JSDocArrayType = 249,
JSDocUnionType = 250,
JSDocTupleType = 251,
JSDocNullableType = 252,
JSDocNonNullableType = 253,
JSDocRecordType = 254,
JSDocRecordMember = 255,
JSDocTypeReference = 256,
JSDocOptionalType = 257,
JSDocFunctionType = 258,
JSDocVariadicType = 259,
JSDocConstructorType = 260,
JSDocThisType = 261,
JSDocComment = 262,
JSDocTag = 263,
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,
LastPunctuation = 65,
ShebangTrivia = 6,
ConflictMarkerTrivia = 7,
NumericLiteral = 8,
StringLiteral = 9,
RegularExpressionLiteral = 10,
NoSubstitutionTemplateLiteral = 11,
TemplateHead = 12,
TemplateMiddle = 13,
TemplateTail = 14,
OpenBraceToken = 15,
CloseBraceToken = 16,
OpenParenToken = 17,
CloseParenToken = 18,
OpenBracketToken = 19,
CloseBracketToken = 20,
DotToken = 21,
DotDotDotToken = 22,
SemicolonToken = 23,
CommaToken = 24,
LessThanToken = 25,
LessThanSlashToken = 26,
GreaterThanToken = 27,
LessThanEqualsToken = 28,
GreaterThanEqualsToken = 29,
EqualsEqualsToken = 30,
ExclamationEqualsToken = 31,
EqualsEqualsEqualsToken = 32,
ExclamationEqualsEqualsToken = 33,
EqualsGreaterThanToken = 34,
PlusToken = 35,
MinusToken = 36,
AsteriskToken = 37,
SlashToken = 38,
PercentToken = 39,
PlusPlusToken = 40,
MinusMinusToken = 41,
LessThanLessThanToken = 42,
GreaterThanGreaterThanToken = 43,
GreaterThanGreaterThanGreaterThanToken = 44,
AmpersandToken = 45,
BarToken = 46,
CaretToken = 47,
ExclamationToken = 48,
TildeToken = 49,
AmpersandAmpersandToken = 50,
BarBarToken = 51,
QuestionToken = 52,
ColonToken = 53,
AtToken = 54,
EqualsToken = 55,
PlusEqualsToken = 56,
MinusEqualsToken = 57,
AsteriskEqualsToken = 58,
SlashEqualsToken = 59,
PercentEqualsToken = 60,
LessThanLessThanEqualsToken = 61,
GreaterThanGreaterThanEqualsToken = 62,
GreaterThanGreaterThanGreaterThanEqualsToken = 63,
AmpersandEqualsToken = 64,
BarEqualsToken = 65,
CaretEqualsToken = 66,
Identifier = 67,
BreakKeyword = 68,
CaseKeyword = 69,
CatchKeyword = 70,
ClassKeyword = 71,
ConstKeyword = 72,
ContinueKeyword = 73,
DebuggerKeyword = 74,
DefaultKeyword = 75,
DeleteKeyword = 76,
DoKeyword = 77,
ElseKeyword = 78,
EnumKeyword = 79,
ExportKeyword = 80,
ExtendsKeyword = 81,
FalseKeyword = 82,
FinallyKeyword = 83,
ForKeyword = 84,
FunctionKeyword = 85,
IfKeyword = 86,
ImportKeyword = 87,
InKeyword = 88,
InstanceOfKeyword = 89,
NewKeyword = 90,
NullKeyword = 91,
ReturnKeyword = 92,
SuperKeyword = 93,
SwitchKeyword = 94,
ThisKeyword = 95,
ThrowKeyword = 96,
TrueKeyword = 97,
TryKeyword = 98,
TypeOfKeyword = 99,
VarKeyword = 100,
VoidKeyword = 101,
WhileKeyword = 102,
WithKeyword = 103,
ImplementsKeyword = 104,
InterfaceKeyword = 105,
LetKeyword = 106,
PackageKeyword = 107,
PrivateKeyword = 108,
ProtectedKeyword = 109,
PublicKeyword = 110,
StaticKeyword = 111,
YieldKeyword = 112,
AbstractKeyword = 113,
AsKeyword = 114,
AnyKeyword = 115,
AsyncKeyword = 116,
AwaitKeyword = 117,
BooleanKeyword = 118,
ConstructorKeyword = 119,
DeclareKeyword = 120,
GetKeyword = 121,
IsKeyword = 122,
ModuleKeyword = 123,
NamespaceKeyword = 124,
RequireKeyword = 125,
NumberKeyword = 126,
SetKeyword = 127,
StringKeyword = 128,
SymbolKeyword = 129,
TypeKeyword = 130,
FromKeyword = 131,
OfKeyword = 132,
QualifiedName = 133,
ComputedPropertyName = 134,
TypeParameter = 135,
Parameter = 136,
Decorator = 137,
PropertySignature = 138,
PropertyDeclaration = 139,
MethodSignature = 140,
MethodDeclaration = 141,
Constructor = 142,
GetAccessor = 143,
SetAccessor = 144,
CallSignature = 145,
ConstructSignature = 146,
IndexSignature = 147,
TypePredicate = 148,
TypeReference = 149,
FunctionType = 150,
ConstructorType = 151,
TypeQuery = 152,
TypeLiteral = 153,
ArrayType = 154,
TupleType = 155,
UnionType = 156,
IntersectionType = 157,
ParenthesizedType = 158,
ObjectBindingPattern = 159,
ArrayBindingPattern = 160,
BindingElement = 161,
ArrayLiteralExpression = 162,
ObjectLiteralExpression = 163,
PropertyAccessExpression = 164,
ElementAccessExpression = 165,
CallExpression = 166,
NewExpression = 167,
TaggedTemplateExpression = 168,
TypeAssertionExpression = 169,
ParenthesizedExpression = 170,
FunctionExpression = 171,
ArrowFunction = 172,
DeleteExpression = 173,
TypeOfExpression = 174,
VoidExpression = 175,
AwaitExpression = 176,
PrefixUnaryExpression = 177,
PostfixUnaryExpression = 178,
BinaryExpression = 179,
ConditionalExpression = 180,
TemplateExpression = 181,
YieldExpression = 182,
SpreadElementExpression = 183,
ClassExpression = 184,
OmittedExpression = 185,
ExpressionWithTypeArguments = 186,
AsExpression = 187,
TemplateSpan = 188,
SemicolonClassElement = 189,
Block = 190,
VariableStatement = 191,
EmptyStatement = 192,
ExpressionStatement = 193,
IfStatement = 194,
DoStatement = 195,
WhileStatement = 196,
ForStatement = 197,
ForInStatement = 198,
ForOfStatement = 199,
ContinueStatement = 200,
BreakStatement = 201,
ReturnStatement = 202,
WithStatement = 203,
SwitchStatement = 204,
LabeledStatement = 205,
ThrowStatement = 206,
TryStatement = 207,
DebuggerStatement = 208,
VariableDeclaration = 209,
VariableDeclarationList = 210,
FunctionDeclaration = 211,
ClassDeclaration = 212,
InterfaceDeclaration = 213,
TypeAliasDeclaration = 214,
EnumDeclaration = 215,
ModuleDeclaration = 216,
ModuleBlock = 217,
CaseBlock = 218,
ImportEqualsDeclaration = 219,
ImportDeclaration = 220,
ImportClause = 221,
NamespaceImport = 222,
NamedImports = 223,
ImportSpecifier = 224,
ExportAssignment = 225,
ExportDeclaration = 226,
NamedExports = 227,
ExportSpecifier = 228,
MissingDeclaration = 229,
ExternalModuleReference = 230,
JsxElement = 231,
JsxSelfClosingElement = 232,
JsxOpeningElement = 233,
JsxText = 234,
JsxClosingElement = 235,
JsxAttribute = 236,
JsxSpreadAttribute = 237,
JsxExpression = 238,
CaseClause = 239,
DefaultClause = 240,
HeritageClause = 241,
CatchClause = 242,
PropertyAssignment = 243,
ShorthandPropertyAssignment = 244,
EnumMember = 245,
SourceFile = 246,
JSDocTypeExpression = 247,
JSDocAllType = 248,
JSDocUnknownType = 249,
JSDocArrayType = 250,
JSDocUnionType = 251,
JSDocTupleType = 252,
JSDocNullableType = 253,
JSDocNonNullableType = 254,
JSDocRecordType = 255,
JSDocRecordMember = 256,
JSDocTypeReference = 257,
JSDocOptionalType = 258,
JSDocFunctionType = 259,
JSDocVariadicType = 260,
JSDocConstructorType = 261,
JSDocThisType = 262,
JSDocComment = 263,
JSDocTag = 264,
JSDocParameterTag = 265,
JSDocReturnTag = 266,
JSDocTypeTag = 267,
JSDocTemplateTag = 268,
SyntaxList = 269,
Count = 270,
FirstAssignment = 55,
LastAssignment = 66,
FirstReservedWord = 68,
LastReservedWord = 103,
FirstKeyword = 68,
LastKeyword = 132,
FirstFutureReservedWord = 104,
LastFutureReservedWord = 112,
FirstTypeNode = 149,
LastTypeNode = 158,
FirstPunctuation = 15,
LastPunctuation = 66,
FirstToken = 0,
LastToken = 131,
LastToken = 132,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
LastLiteralToken = 10,
FirstTemplateToken = 10,
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 65,
FirstNode = 132,
LastTriviaToken = 7,
FirstLiteralToken = 8,
LastLiteralToken = 11,
FirstTemplateToken = 11,
LastTemplateToken = 14,
FirstBinaryOperator = 25,
LastBinaryOperator = 66,
FirstNode = 133,
}
const enum NodeFlags {
Export = 1,
@ -452,9 +454,9 @@ declare module "typescript" {
* Several node kinds share function-like features such as a signature,
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
* Examples:
* FunctionDeclaration
* MethodDeclaration
* AccessorDeclaration
* - FunctionDeclaration
* - MethodDeclaration
* - AccessorDeclaration
*/
interface FunctionLikeDeclaration extends SignatureDeclaration {
_functionLikeDeclarationBrand: any;
@ -944,7 +946,7 @@ declare module "typescript" {
getSourceFile(fileName: string): SourceFile;
getCurrentDirectory(): string;
}
interface ParseConfigHost {
interface ParseConfigHost extends ModuleResolutionHost {
readDirectory(rootDir: string, extension: string, exclude: string[]): string[];
}
interface WriteFileCallback {
@ -958,6 +960,10 @@ declare module "typescript" {
throwIfCancellationRequested(): void;
}
interface Program extends ScriptReferenceHost {
/**
* Get a list of root file names that were passed to a 'createProgram'
*/
getRootFileNames(): string[];
/**
* Get a list of files in the program
*/
@ -1026,6 +1032,7 @@ declare module "typescript" {
getPropertyOfType(type: Type, propertyName: string): Symbol;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type;
getBaseTypes(type: InterfaceType): ObjectType[];
getReturnTypeOfSignature(signature: Signature): Type;
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
getSymbolAtLocation(node: Node): Symbol;
@ -1049,6 +1056,7 @@ declare module "typescript" {
getExportsOfModule(moduleSymbol: Symbol): Symbol[];
getJsxElementAttributesType(elementNode: JsxOpeningLikeElement): Type;
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
}
interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@ -1193,7 +1201,7 @@ declare module "typescript" {
Anonymous = 65536,
Instantiated = 131072,
ObjectLiteral = 524288,
ESSymbol = 4194304,
ESSymbol = 16777216,
StringLike = 258,
NumberLike = 132,
ObjectType = 80896,
@ -1213,8 +1221,6 @@ declare module "typescript" {
typeParameters: TypeParameter[];
outerTypeParameters: TypeParameter[];
localTypeParameters: TypeParameter[];
resolvedBaseConstructorType?: Type;
resolvedBaseTypes: ObjectType[];
}
interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
declaredProperties: Symbol[];
@ -1310,6 +1316,7 @@ declare module "typescript" {
noLib?: boolean;
noResolve?: boolean;
out?: string;
outFile?: string;
outDir?: string;
preserveConstEnums?: boolean;
project?: string;
@ -1362,14 +1369,25 @@ declare module "typescript" {
fileNames: string[];
errors: Diagnostic[];
}
interface CompilerHost {
interface ModuleResolutionHost {
fileExists(fileName: string): boolean;
readFile(fileName: string): string;
}
interface ResolvedModule {
resolvedFileName: string;
failedLookupLocations: string[];
}
type ModuleNameResolver = (moduleName: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost) => ResolvedModule;
interface CompilerHost extends ModuleResolutionHost {
getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile;
getCancellationToken?(): CancellationToken;
getDefaultLibFileName(options: CompilerOptions): string;
writeFile: WriteFileCallback;
getCurrentDirectory(): string;
getCanonicalFileName(fileName: string): string;
useCaseSensitiveFileNames(): boolean;
getNewLine(): string;
resolveModuleNames?(moduleNames: string[], containingFile: string): string[];
}
interface TextSpan {
start: number;
@ -1443,8 +1461,11 @@ declare module "typescript" {
function couldStartTrivia(text: string, pos: number): boolean;
function getLeadingCommentRanges(text: string, pos: number): CommentRange[];
function getTrailingCommentRanges(text: string, pos: number): CommentRange[];
/** Optionally, get the shebang */
function getShebang(text: string): string;
function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean;
function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean;
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
}
declare module "typescript" {
function getDefaultLibFileName(options: CompilerOptions): string;
@ -1484,13 +1505,14 @@ declare module "typescript" {
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
}
declare module "typescript" {
/** The version of the TypeScript compiler release */
const version: string;
function findConfigFile(searchPath: string): string;
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModule;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
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, oldProgram?: Program): Program;
}
declare module "typescript" {
function parseCommandLine(commandLine: string[]): ParsedCommandLine;
@ -1554,6 +1576,7 @@ declare module "typescript" {
getConstructSignatures(): Signature[];
getStringIndexType(): Type;
getNumberIndexType(): Type;
getBaseTypes(): ObjectType[];
}
interface Signature {
getDeclaration(): SignatureDeclaration;
@ -1595,6 +1618,7 @@ declare module "typescript" {
interface PreProcessedFileInfo {
referencedFiles: FileReference[];
importedFiles: FileReference[];
ambientExternalModules: string[];
isLibFile: boolean;
}
interface HostCancellationToken {
@ -1615,6 +1639,7 @@ declare module "typescript" {
trace?(s: string): void;
error?(s: string): void;
useCaseSensitiveFileNames?(): boolean;
resolveModuleNames?(moduleNames: string[], containingFile: string): string[];
}
interface LanguageService {
cleanupSemanticCache(): void;
@ -1655,6 +1680,7 @@ declare module "typescript" {
getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[];
getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[];
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[];
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion;
getEmitOutput(fileName: string): EmitOutput;
getProgram(): Program;
getSourceFile(fileName: string): SourceFile;
@ -1691,6 +1717,11 @@ declare module "typescript" {
span: TextSpan;
newText: string;
}
interface TextInsertion {
newText: string;
/** The position in newText the caret should point to after the insertion. */
caretOffset: number;
}
interface RenameLocation {
textSpan: TextSpan;
fileName: string;
@ -1711,6 +1742,7 @@ declare module "typescript" {
const writtenReference: string;
}
interface HighlightSpan {
fileName?: string;
textSpan: TextSpan;
kind: string;
}
@ -1738,6 +1770,7 @@ declare module "typescript" {
InsertSpaceAfterKeywordsInControlFlowStatements: boolean;
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
PlaceOpenBraceOnNewLineForFunctions: boolean;
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
[s: string]: boolean | number | string;
@ -1980,6 +2013,7 @@ declare module "typescript" {
* @param compilationSettings The compilation settings used to acquire the file
*/
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
reportStats(): string;
}
module ScriptElementKind {
const unknown: string;
@ -2066,10 +2100,24 @@ declare module "typescript" {
}
function displayPartsToString(displayParts: SymbolDisplayPart[]): string;
function getDefaultCompilerOptions(): CompilerOptions;
interface TranspileOptions {
compilerOptions?: CompilerOptions;
fileName?: string;
reportDiagnostics?: boolean;
moduleName?: string;
renamedDependencies?: Map<string>;
}
interface TranspileOutput {
outputText: string;
diagnostics?: Diagnostic[];
sourceMapText?: string;
}
function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput;
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;
let disableIncrementalParsing: boolean;
function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string;
function createDocumentRegistry(useCaseSensitiveFileNames?: boolean): DocumentRegistry;
function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo;
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService;

File diff suppressed because it is too large Load Diff

View File

@ -23,6 +23,7 @@ declare namespace ts {
contains(fileName: string): boolean;
remove(fileName: string): void;
forEachValue(f: (v: T) => void): void;
clear(): void;
}
interface TextRange {
pos: number;
@ -35,293 +36,294 @@ declare namespace ts {
MultiLineCommentTrivia = 3,
NewLineTrivia = 4,
WhitespaceTrivia = 5,
ConflictMarkerTrivia = 6,
NumericLiteral = 7,
StringLiteral = 8,
RegularExpressionLiteral = 9,
NoSubstitutionTemplateLiteral = 10,
TemplateHead = 11,
TemplateMiddle = 12,
TemplateTail = 13,
OpenBraceToken = 14,
CloseBraceToken = 15,
OpenParenToken = 16,
CloseParenToken = 17,
OpenBracketToken = 18,
CloseBracketToken = 19,
DotToken = 20,
DotDotDotToken = 21,
SemicolonToken = 22,
CommaToken = 23,
LessThanToken = 24,
LessThanSlashToken = 25,
GreaterThanToken = 26,
LessThanEqualsToken = 27,
GreaterThanEqualsToken = 28,
EqualsEqualsToken = 29,
ExclamationEqualsToken = 30,
EqualsEqualsEqualsToken = 31,
ExclamationEqualsEqualsToken = 32,
EqualsGreaterThanToken = 33,
PlusToken = 34,
MinusToken = 35,
AsteriskToken = 36,
SlashToken = 37,
PercentToken = 38,
PlusPlusToken = 39,
MinusMinusToken = 40,
LessThanLessThanToken = 41,
GreaterThanGreaterThanToken = 42,
GreaterThanGreaterThanGreaterThanToken = 43,
AmpersandToken = 44,
BarToken = 45,
CaretToken = 46,
ExclamationToken = 47,
TildeToken = 48,
AmpersandAmpersandToken = 49,
BarBarToken = 50,
QuestionToken = 51,
ColonToken = 52,
AtToken = 53,
EqualsToken = 54,
PlusEqualsToken = 55,
MinusEqualsToken = 56,
AsteriskEqualsToken = 57,
SlashEqualsToken = 58,
PercentEqualsToken = 59,
LessThanLessThanEqualsToken = 60,
GreaterThanGreaterThanEqualsToken = 61,
GreaterThanGreaterThanGreaterThanEqualsToken = 62,
AmpersandEqualsToken = 63,
BarEqualsToken = 64,
CaretEqualsToken = 65,
Identifier = 66,
BreakKeyword = 67,
CaseKeyword = 68,
CatchKeyword = 69,
ClassKeyword = 70,
ConstKeyword = 71,
ContinueKeyword = 72,
DebuggerKeyword = 73,
DefaultKeyword = 74,
DeleteKeyword = 75,
DoKeyword = 76,
ElseKeyword = 77,
EnumKeyword = 78,
ExportKeyword = 79,
ExtendsKeyword = 80,
FalseKeyword = 81,
FinallyKeyword = 82,
ForKeyword = 83,
FunctionKeyword = 84,
IfKeyword = 85,
ImportKeyword = 86,
InKeyword = 87,
InstanceOfKeyword = 88,
NewKeyword = 89,
NullKeyword = 90,
ReturnKeyword = 91,
SuperKeyword = 92,
SwitchKeyword = 93,
ThisKeyword = 94,
ThrowKeyword = 95,
TrueKeyword = 96,
TryKeyword = 97,
TypeOfKeyword = 98,
VarKeyword = 99,
VoidKeyword = 100,
WhileKeyword = 101,
WithKeyword = 102,
ImplementsKeyword = 103,
InterfaceKeyword = 104,
LetKeyword = 105,
PackageKeyword = 106,
PrivateKeyword = 107,
ProtectedKeyword = 108,
PublicKeyword = 109,
StaticKeyword = 110,
YieldKeyword = 111,
AbstractKeyword = 112,
AsKeyword = 113,
AnyKeyword = 114,
AsyncKeyword = 115,
AwaitKeyword = 116,
BooleanKeyword = 117,
ConstructorKeyword = 118,
DeclareKeyword = 119,
GetKeyword = 120,
IsKeyword = 121,
ModuleKeyword = 122,
NamespaceKeyword = 123,
RequireKeyword = 124,
NumberKeyword = 125,
SetKeyword = 126,
StringKeyword = 127,
SymbolKeyword = 128,
TypeKeyword = 129,
FromKeyword = 130,
OfKeyword = 131,
QualifiedName = 132,
ComputedPropertyName = 133,
TypeParameter = 134,
Parameter = 135,
Decorator = 136,
PropertySignature = 137,
PropertyDeclaration = 138,
MethodSignature = 139,
MethodDeclaration = 140,
Constructor = 141,
GetAccessor = 142,
SetAccessor = 143,
CallSignature = 144,
ConstructSignature = 145,
IndexSignature = 146,
TypePredicate = 147,
TypeReference = 148,
FunctionType = 149,
ConstructorType = 150,
TypeQuery = 151,
TypeLiteral = 152,
ArrayType = 153,
TupleType = 154,
UnionType = 155,
IntersectionType = 156,
ParenthesizedType = 157,
ObjectBindingPattern = 158,
ArrayBindingPattern = 159,
BindingElement = 160,
ArrayLiteralExpression = 161,
ObjectLiteralExpression = 162,
PropertyAccessExpression = 163,
ElementAccessExpression = 164,
CallExpression = 165,
NewExpression = 166,
TaggedTemplateExpression = 167,
TypeAssertionExpression = 168,
ParenthesizedExpression = 169,
FunctionExpression = 170,
ArrowFunction = 171,
DeleteExpression = 172,
TypeOfExpression = 173,
VoidExpression = 174,
AwaitExpression = 175,
PrefixUnaryExpression = 176,
PostfixUnaryExpression = 177,
BinaryExpression = 178,
ConditionalExpression = 179,
TemplateExpression = 180,
YieldExpression = 181,
SpreadElementExpression = 182,
ClassExpression = 183,
OmittedExpression = 184,
ExpressionWithTypeArguments = 185,
AsExpression = 186,
TemplateSpan = 187,
SemicolonClassElement = 188,
Block = 189,
VariableStatement = 190,
EmptyStatement = 191,
ExpressionStatement = 192,
IfStatement = 193,
DoStatement = 194,
WhileStatement = 195,
ForStatement = 196,
ForInStatement = 197,
ForOfStatement = 198,
ContinueStatement = 199,
BreakStatement = 200,
ReturnStatement = 201,
WithStatement = 202,
SwitchStatement = 203,
LabeledStatement = 204,
ThrowStatement = 205,
TryStatement = 206,
DebuggerStatement = 207,
VariableDeclaration = 208,
VariableDeclarationList = 209,
FunctionDeclaration = 210,
ClassDeclaration = 211,
InterfaceDeclaration = 212,
TypeAliasDeclaration = 213,
EnumDeclaration = 214,
ModuleDeclaration = 215,
ModuleBlock = 216,
CaseBlock = 217,
ImportEqualsDeclaration = 218,
ImportDeclaration = 219,
ImportClause = 220,
NamespaceImport = 221,
NamedImports = 222,
ImportSpecifier = 223,
ExportAssignment = 224,
ExportDeclaration = 225,
NamedExports = 226,
ExportSpecifier = 227,
MissingDeclaration = 228,
ExternalModuleReference = 229,
JsxElement = 230,
JsxSelfClosingElement = 231,
JsxOpeningElement = 232,
JsxText = 233,
JsxClosingElement = 234,
JsxAttribute = 235,
JsxSpreadAttribute = 236,
JsxExpression = 237,
CaseClause = 238,
DefaultClause = 239,
HeritageClause = 240,
CatchClause = 241,
PropertyAssignment = 242,
ShorthandPropertyAssignment = 243,
EnumMember = 244,
SourceFile = 245,
JSDocTypeExpression = 246,
JSDocAllType = 247,
JSDocUnknownType = 248,
JSDocArrayType = 249,
JSDocUnionType = 250,
JSDocTupleType = 251,
JSDocNullableType = 252,
JSDocNonNullableType = 253,
JSDocRecordType = 254,
JSDocRecordMember = 255,
JSDocTypeReference = 256,
JSDocOptionalType = 257,
JSDocFunctionType = 258,
JSDocVariadicType = 259,
JSDocConstructorType = 260,
JSDocThisType = 261,
JSDocComment = 262,
JSDocTag = 263,
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,
LastPunctuation = 65,
ShebangTrivia = 6,
ConflictMarkerTrivia = 7,
NumericLiteral = 8,
StringLiteral = 9,
RegularExpressionLiteral = 10,
NoSubstitutionTemplateLiteral = 11,
TemplateHead = 12,
TemplateMiddle = 13,
TemplateTail = 14,
OpenBraceToken = 15,
CloseBraceToken = 16,
OpenParenToken = 17,
CloseParenToken = 18,
OpenBracketToken = 19,
CloseBracketToken = 20,
DotToken = 21,
DotDotDotToken = 22,
SemicolonToken = 23,
CommaToken = 24,
LessThanToken = 25,
LessThanSlashToken = 26,
GreaterThanToken = 27,
LessThanEqualsToken = 28,
GreaterThanEqualsToken = 29,
EqualsEqualsToken = 30,
ExclamationEqualsToken = 31,
EqualsEqualsEqualsToken = 32,
ExclamationEqualsEqualsToken = 33,
EqualsGreaterThanToken = 34,
PlusToken = 35,
MinusToken = 36,
AsteriskToken = 37,
SlashToken = 38,
PercentToken = 39,
PlusPlusToken = 40,
MinusMinusToken = 41,
LessThanLessThanToken = 42,
GreaterThanGreaterThanToken = 43,
GreaterThanGreaterThanGreaterThanToken = 44,
AmpersandToken = 45,
BarToken = 46,
CaretToken = 47,
ExclamationToken = 48,
TildeToken = 49,
AmpersandAmpersandToken = 50,
BarBarToken = 51,
QuestionToken = 52,
ColonToken = 53,
AtToken = 54,
EqualsToken = 55,
PlusEqualsToken = 56,
MinusEqualsToken = 57,
AsteriskEqualsToken = 58,
SlashEqualsToken = 59,
PercentEqualsToken = 60,
LessThanLessThanEqualsToken = 61,
GreaterThanGreaterThanEqualsToken = 62,
GreaterThanGreaterThanGreaterThanEqualsToken = 63,
AmpersandEqualsToken = 64,
BarEqualsToken = 65,
CaretEqualsToken = 66,
Identifier = 67,
BreakKeyword = 68,
CaseKeyword = 69,
CatchKeyword = 70,
ClassKeyword = 71,
ConstKeyword = 72,
ContinueKeyword = 73,
DebuggerKeyword = 74,
DefaultKeyword = 75,
DeleteKeyword = 76,
DoKeyword = 77,
ElseKeyword = 78,
EnumKeyword = 79,
ExportKeyword = 80,
ExtendsKeyword = 81,
FalseKeyword = 82,
FinallyKeyword = 83,
ForKeyword = 84,
FunctionKeyword = 85,
IfKeyword = 86,
ImportKeyword = 87,
InKeyword = 88,
InstanceOfKeyword = 89,
NewKeyword = 90,
NullKeyword = 91,
ReturnKeyword = 92,
SuperKeyword = 93,
SwitchKeyword = 94,
ThisKeyword = 95,
ThrowKeyword = 96,
TrueKeyword = 97,
TryKeyword = 98,
TypeOfKeyword = 99,
VarKeyword = 100,
VoidKeyword = 101,
WhileKeyword = 102,
WithKeyword = 103,
ImplementsKeyword = 104,
InterfaceKeyword = 105,
LetKeyword = 106,
PackageKeyword = 107,
PrivateKeyword = 108,
ProtectedKeyword = 109,
PublicKeyword = 110,
StaticKeyword = 111,
YieldKeyword = 112,
AbstractKeyword = 113,
AsKeyword = 114,
AnyKeyword = 115,
AsyncKeyword = 116,
AwaitKeyword = 117,
BooleanKeyword = 118,
ConstructorKeyword = 119,
DeclareKeyword = 120,
GetKeyword = 121,
IsKeyword = 122,
ModuleKeyword = 123,
NamespaceKeyword = 124,
RequireKeyword = 125,
NumberKeyword = 126,
SetKeyword = 127,
StringKeyword = 128,
SymbolKeyword = 129,
TypeKeyword = 130,
FromKeyword = 131,
OfKeyword = 132,
QualifiedName = 133,
ComputedPropertyName = 134,
TypeParameter = 135,
Parameter = 136,
Decorator = 137,
PropertySignature = 138,
PropertyDeclaration = 139,
MethodSignature = 140,
MethodDeclaration = 141,
Constructor = 142,
GetAccessor = 143,
SetAccessor = 144,
CallSignature = 145,
ConstructSignature = 146,
IndexSignature = 147,
TypePredicate = 148,
TypeReference = 149,
FunctionType = 150,
ConstructorType = 151,
TypeQuery = 152,
TypeLiteral = 153,
ArrayType = 154,
TupleType = 155,
UnionType = 156,
IntersectionType = 157,
ParenthesizedType = 158,
ObjectBindingPattern = 159,
ArrayBindingPattern = 160,
BindingElement = 161,
ArrayLiteralExpression = 162,
ObjectLiteralExpression = 163,
PropertyAccessExpression = 164,
ElementAccessExpression = 165,
CallExpression = 166,
NewExpression = 167,
TaggedTemplateExpression = 168,
TypeAssertionExpression = 169,
ParenthesizedExpression = 170,
FunctionExpression = 171,
ArrowFunction = 172,
DeleteExpression = 173,
TypeOfExpression = 174,
VoidExpression = 175,
AwaitExpression = 176,
PrefixUnaryExpression = 177,
PostfixUnaryExpression = 178,
BinaryExpression = 179,
ConditionalExpression = 180,
TemplateExpression = 181,
YieldExpression = 182,
SpreadElementExpression = 183,
ClassExpression = 184,
OmittedExpression = 185,
ExpressionWithTypeArguments = 186,
AsExpression = 187,
TemplateSpan = 188,
SemicolonClassElement = 189,
Block = 190,
VariableStatement = 191,
EmptyStatement = 192,
ExpressionStatement = 193,
IfStatement = 194,
DoStatement = 195,
WhileStatement = 196,
ForStatement = 197,
ForInStatement = 198,
ForOfStatement = 199,
ContinueStatement = 200,
BreakStatement = 201,
ReturnStatement = 202,
WithStatement = 203,
SwitchStatement = 204,
LabeledStatement = 205,
ThrowStatement = 206,
TryStatement = 207,
DebuggerStatement = 208,
VariableDeclaration = 209,
VariableDeclarationList = 210,
FunctionDeclaration = 211,
ClassDeclaration = 212,
InterfaceDeclaration = 213,
TypeAliasDeclaration = 214,
EnumDeclaration = 215,
ModuleDeclaration = 216,
ModuleBlock = 217,
CaseBlock = 218,
ImportEqualsDeclaration = 219,
ImportDeclaration = 220,
ImportClause = 221,
NamespaceImport = 222,
NamedImports = 223,
ImportSpecifier = 224,
ExportAssignment = 225,
ExportDeclaration = 226,
NamedExports = 227,
ExportSpecifier = 228,
MissingDeclaration = 229,
ExternalModuleReference = 230,
JsxElement = 231,
JsxSelfClosingElement = 232,
JsxOpeningElement = 233,
JsxText = 234,
JsxClosingElement = 235,
JsxAttribute = 236,
JsxSpreadAttribute = 237,
JsxExpression = 238,
CaseClause = 239,
DefaultClause = 240,
HeritageClause = 241,
CatchClause = 242,
PropertyAssignment = 243,
ShorthandPropertyAssignment = 244,
EnumMember = 245,
SourceFile = 246,
JSDocTypeExpression = 247,
JSDocAllType = 248,
JSDocUnknownType = 249,
JSDocArrayType = 250,
JSDocUnionType = 251,
JSDocTupleType = 252,
JSDocNullableType = 253,
JSDocNonNullableType = 254,
JSDocRecordType = 255,
JSDocRecordMember = 256,
JSDocTypeReference = 257,
JSDocOptionalType = 258,
JSDocFunctionType = 259,
JSDocVariadicType = 260,
JSDocConstructorType = 261,
JSDocThisType = 262,
JSDocComment = 263,
JSDocTag = 264,
JSDocParameterTag = 265,
JSDocReturnTag = 266,
JSDocTypeTag = 267,
JSDocTemplateTag = 268,
SyntaxList = 269,
Count = 270,
FirstAssignment = 55,
LastAssignment = 66,
FirstReservedWord = 68,
LastReservedWord = 103,
FirstKeyword = 68,
LastKeyword = 132,
FirstFutureReservedWord = 104,
LastFutureReservedWord = 112,
FirstTypeNode = 149,
LastTypeNode = 158,
FirstPunctuation = 15,
LastPunctuation = 66,
FirstToken = 0,
LastToken = 131,
LastToken = 132,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
LastLiteralToken = 10,
FirstTemplateToken = 10,
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 65,
FirstNode = 132,
LastTriviaToken = 7,
FirstLiteralToken = 8,
LastLiteralToken = 11,
FirstTemplateToken = 11,
LastTemplateToken = 14,
FirstBinaryOperator = 25,
LastBinaryOperator = 66,
FirstNode = 133,
}
const enum NodeFlags {
Export = 1,
@ -452,9 +454,9 @@ declare namespace ts {
* Several node kinds share function-like features such as a signature,
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
* Examples:
* FunctionDeclaration
* MethodDeclaration
* AccessorDeclaration
* - FunctionDeclaration
* - MethodDeclaration
* - AccessorDeclaration
*/
interface FunctionLikeDeclaration extends SignatureDeclaration {
_functionLikeDeclarationBrand: any;
@ -944,7 +946,7 @@ declare namespace ts {
getSourceFile(fileName: string): SourceFile;
getCurrentDirectory(): string;
}
interface ParseConfigHost {
interface ParseConfigHost extends ModuleResolutionHost {
readDirectory(rootDir: string, extension: string, exclude: string[]): string[];
}
interface WriteFileCallback {
@ -958,6 +960,10 @@ declare namespace ts {
throwIfCancellationRequested(): void;
}
interface Program extends ScriptReferenceHost {
/**
* Get a list of root file names that were passed to a 'createProgram'
*/
getRootFileNames(): string[];
/**
* Get a list of files in the program
*/
@ -1026,6 +1032,7 @@ declare namespace ts {
getPropertyOfType(type: Type, propertyName: string): Symbol;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type;
getBaseTypes(type: InterfaceType): ObjectType[];
getReturnTypeOfSignature(signature: Signature): Type;
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
getSymbolAtLocation(node: Node): Symbol;
@ -1049,6 +1056,7 @@ declare namespace ts {
getExportsOfModule(moduleSymbol: Symbol): Symbol[];
getJsxElementAttributesType(elementNode: JsxOpeningLikeElement): Type;
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
}
interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@ -1193,7 +1201,7 @@ declare namespace ts {
Anonymous = 65536,
Instantiated = 131072,
ObjectLiteral = 524288,
ESSymbol = 4194304,
ESSymbol = 16777216,
StringLike = 258,
NumberLike = 132,
ObjectType = 80896,
@ -1213,8 +1221,6 @@ declare namespace ts {
typeParameters: TypeParameter[];
outerTypeParameters: TypeParameter[];
localTypeParameters: TypeParameter[];
resolvedBaseConstructorType?: Type;
resolvedBaseTypes: ObjectType[];
}
interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
declaredProperties: Symbol[];
@ -1310,6 +1316,7 @@ declare namespace ts {
noLib?: boolean;
noResolve?: boolean;
out?: string;
outFile?: string;
outDir?: string;
preserveConstEnums?: boolean;
project?: string;
@ -1362,14 +1369,25 @@ declare namespace ts {
fileNames: string[];
errors: Diagnostic[];
}
interface CompilerHost {
interface ModuleResolutionHost {
fileExists(fileName: string): boolean;
readFile(fileName: string): string;
}
interface ResolvedModule {
resolvedFileName: string;
failedLookupLocations: string[];
}
type ModuleNameResolver = (moduleName: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost) => ResolvedModule;
interface CompilerHost extends ModuleResolutionHost {
getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile;
getCancellationToken?(): CancellationToken;
getDefaultLibFileName(options: CompilerOptions): string;
writeFile: WriteFileCallback;
getCurrentDirectory(): string;
getCanonicalFileName(fileName: string): string;
useCaseSensitiveFileNames(): boolean;
getNewLine(): string;
resolveModuleNames?(moduleNames: string[], containingFile: string): string[];
}
interface TextSpan {
start: number;
@ -1443,9 +1461,11 @@ declare namespace ts {
function couldStartTrivia(text: string, pos: number): boolean;
function getLeadingCommentRanges(text: string, pos: number): CommentRange[];
function getTrailingCommentRanges(text: string, pos: number): CommentRange[];
/** Optionally, get the shebang */
function getShebang(text: string): string;
function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean;
function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean;
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant: ts.LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
}
declare namespace ts {
function getDefaultLibFileName(options: CompilerOptions): string;
@ -1485,13 +1505,14 @@ declare namespace ts {
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
}
declare namespace ts {
/** The version of the TypeScript compiler release */
const version: string;
function findConfigFile(searchPath: string): string;
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModule;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
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, oldProgram?: Program): Program;
}
declare namespace ts {
function parseCommandLine(commandLine: string[]): ParsedCommandLine;
@ -1555,6 +1576,7 @@ declare namespace ts {
getConstructSignatures(): Signature[];
getStringIndexType(): Type;
getNumberIndexType(): Type;
getBaseTypes(): ObjectType[];
}
interface Signature {
getDeclaration(): SignatureDeclaration;
@ -1596,6 +1618,7 @@ declare namespace ts {
interface PreProcessedFileInfo {
referencedFiles: FileReference[];
importedFiles: FileReference[];
ambientExternalModules: string[];
isLibFile: boolean;
}
interface HostCancellationToken {
@ -1616,6 +1639,7 @@ declare namespace ts {
trace?(s: string): void;
error?(s: string): void;
useCaseSensitiveFileNames?(): boolean;
resolveModuleNames?(moduleNames: string[], containingFile: string): string[];
}
interface LanguageService {
cleanupSemanticCache(): void;
@ -1656,6 +1680,7 @@ declare namespace ts {
getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[];
getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[];
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[];
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion;
getEmitOutput(fileName: string): EmitOutput;
getProgram(): Program;
getSourceFile(fileName: string): SourceFile;
@ -1692,6 +1717,11 @@ declare namespace ts {
span: TextSpan;
newText: string;
}
interface TextInsertion {
newText: string;
/** The position in newText the caret should point to after the insertion. */
caretOffset: number;
}
interface RenameLocation {
textSpan: TextSpan;
fileName: string;
@ -1712,6 +1742,7 @@ declare namespace ts {
const writtenReference: string;
}
interface HighlightSpan {
fileName?: string;
textSpan: TextSpan;
kind: string;
}
@ -1739,6 +1770,7 @@ declare namespace ts {
InsertSpaceAfterKeywordsInControlFlowStatements: boolean;
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
PlaceOpenBraceOnNewLineForFunctions: boolean;
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
[s: string]: boolean | number | string;
@ -1981,6 +2013,7 @@ declare namespace ts {
* @param compilationSettings The compilation settings used to acquire the file
*/
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
reportStats(): string;
}
module ScriptElementKind {
const unknown: string;
@ -2067,10 +2100,24 @@ declare namespace ts {
}
function displayPartsToString(displayParts: SymbolDisplayPart[]): string;
function getDefaultCompilerOptions(): CompilerOptions;
interface TranspileOptions {
compilerOptions?: CompilerOptions;
fileName?: string;
reportDiagnostics?: boolean;
moduleName?: string;
renamedDependencies?: Map<string>;
}
interface TranspileOutput {
outputText: string;
diagnostics?: Diagnostic[];
sourceMapText?: string;
}
function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput;
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;
let disableIncrementalParsing: boolean;
function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string;
function createDocumentRegistry(useCaseSensitiveFileNames?: boolean): DocumentRegistry;
function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo;
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService;

File diff suppressed because it is too large Load Diff