Merge pull request #2112 from Microsoft/lkg

Update LKG.
This commit is contained in:
CyrusNajmabadi 2015-02-23 00:05:19 -08:00
commit 64dd747c0e
9 changed files with 37120 additions and 4770 deletions

78
bin/lib.core.es6.d.ts vendored
View File

@ -1164,7 +1164,7 @@ interface ArrayConstructor {
}
declare var Array: ArrayConstructor;
declare type PropertyKey = string | number | Symbol;
declare type PropertyKey = string | number | symbol;
interface Symbol {
/** Returns a string representation of an object. */
@ -1173,7 +1173,7 @@ interface Symbol {
/** Returns the primitive value of the specified object. */
valueOf(): Object;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface SymbolConstructor {
@ -1186,21 +1186,21 @@ interface SymbolConstructor {
* Returns a new unique Symbol value.
* @param description Description of the new Symbol object.
*/
(description?: string|number): Symbol;
(description?: string|number): symbol;
/**
* Returns a Symbol object from the global symbol registry matching the given key if found.
* Otherwise, returns a new symbol with this key.
* @param key key to search for.
*/
for(key: string): Symbol;
for(key: string): symbol;
/**
* Returns a key from the global symbol registry matching the given Symbol if found.
* Otherwise, returns a undefined.
* @param sym Symbol to find the key for.
*/
keyFor(sym: Symbol): string;
keyFor(sym: symbol): string;
// Well-known Symbols
@ -1208,42 +1208,42 @@ interface SymbolConstructor {
* A method that determines if a constructor object recognizes an object as one of the
* constructors instances. Called by the semantics of the instanceof operator.
*/
hasInstance: Symbol;
hasInstance: symbol;
/**
* A Boolean value that if true indicates that an object should flatten to its array elements
* by Array.prototype.concat.
*/
isConcatSpreadable: Symbol;
isConcatSpreadable: symbol;
/**
* A Boolean value that if true indicates that an object may be used as a regular expression.
*/
isRegExp: Symbol;
isRegExp: symbol;
/**
* A method that returns the default iterator for an object.Called by the semantics of the
* for-of statement.
*/
iterator: Symbol;
iterator: symbol;
/**
* A method that converts an object to a corresponding primitive value.Called by the ToPrimitive
* abstract operation.
*/
toPrimitive: Symbol;
toPrimitive: symbol;
/**
* A String value that is used in the creation of the default string description of an object.
* Called by the built- in method Object.prototype.toString.
*/
toStringTag: Symbol;
toStringTag: symbol;
/**
* An Object whose own property names are property names that are excluded from the with
* environment bindings of the associated objects.
*/
unscopables: Symbol;
unscopables: symbol;
}
declare var Symbol: SymbolConstructor;
@ -1274,7 +1274,7 @@ interface ObjectConstructor {
* Returns an array of all symbol properties found directly on object o.
* @param o Object to retrieve the symbols from.
*/
getOwnPropertySymbols(o: any): Symbol[];
getOwnPropertySymbols(o: any): symbol[];
/**
* Returns true if the values are the same value, false otherwise.
@ -1396,7 +1396,7 @@ interface ArrayLike<T> {
interface Array<T> {
/** Iterator */
// [Symbol.iterator] (): Iterator<T>;
[Symbol.iterator] (): Iterator<T>;
/**
* Returns an array of key, value pairs for every entry in the array
@ -1495,7 +1495,7 @@ interface ArrayConstructor {
interface String {
/** Iterator */
// [Symbol.iterator] (): Iterator<string>;
[Symbol.iterator] (): Iterator<string>;
/**
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
@ -1613,12 +1613,12 @@ interface IteratorResult<T> {
}
interface Iterator<T> {
//[Symbol.iterator](): Iterator<T>;
[Symbol.iterator](): Iterator<T>;
next(): IteratorResult<T>;
}
interface Iterable<T> {
//[Symbol.iterator](): Iterator<T>;
[Symbol.iterator](): Iterator<T>;
}
interface GeneratorFunction extends Function {
@ -1640,7 +1640,7 @@ interface Generator<T> extends Iterator<T> {
next(value?: any): IteratorResult<T>;
throw (exception: any): IteratorResult<T>;
return (value: T): IteratorResult<T>;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface Math {
@ -1754,11 +1754,11 @@ interface Math {
*/
cbrt(x: number): number;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface RegExp {
// [Symbol.isRegExp]: boolean;
[Symbol.isRegExp]: boolean;
/**
* Matches a string with a regular expression, and returns an array containing the results of
@ -1815,8 +1815,8 @@ interface Map<K, V> {
set(key: K, value?: V): Map<K, V>;
size: number;
values(): Iterator<V>;
// [Symbol.iterator]():Iterator<[K,V]>;
// [Symbol.toStringTag]: string;
[Symbol.iterator]():Iterator<[K,V]>;
[Symbol.toStringTag]: string;
}
interface MapConstructor {
@ -1832,7 +1832,7 @@ interface WeakMap<K, V> {
get(key: K): V;
has(key: K): boolean;
set(key: K, value?: V): WeakMap<K, V>;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface WeakMapConstructor {
@ -1852,8 +1852,8 @@ interface Set<T> {
keys(): Iterator<T>;
size: number;
values(): Iterator<T>;
// [Symbol.iterator]():Iterator<T>;
// [Symbol.toStringTag]: string;
[Symbol.iterator]():Iterator<T>;
[Symbol.toStringTag]: string;
}
interface SetConstructor {
@ -1868,7 +1868,7 @@ interface WeakSet<T> {
clear(): void;
delete(value: T): boolean;
has(value: T): boolean;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface WeakSetConstructor {
@ -1879,7 +1879,7 @@ interface WeakSetConstructor {
declare var WeakSet: WeakSetConstructor;
interface JSON {
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
/**
@ -1899,7 +1899,7 @@ interface ArrayBuffer {
*/
slice(begin: number, end?: number): ArrayBuffer;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface ArrayBufferConstructor {
@ -2036,7 +2036,7 @@ interface DataView {
*/
setUint32(byteOffset: number, value: number, littleEndian: boolean): void;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface DataViewConstructor {
@ -2303,7 +2303,7 @@ interface Int8Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Int8ArrayConstructor {
@ -2593,7 +2593,7 @@ interface Uint8Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Uint8ArrayConstructor {
@ -2883,7 +2883,7 @@ interface Uint8ClampedArray {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Uint8ClampedArrayConstructor {
@ -3173,7 +3173,7 @@ interface Int16Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Int16ArrayConstructor {
@ -3463,7 +3463,7 @@ interface Uint16Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Uint16ArrayConstructor {
@ -3753,7 +3753,7 @@ interface Int32Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Int32ArrayConstructor {
@ -4043,7 +4043,7 @@ interface Uint32Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Uint32ArrayConstructor {
@ -4333,7 +4333,7 @@ interface Float32Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Float32ArrayConstructor {
@ -4623,7 +4623,7 @@ interface Float64Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Float64ArrayConstructor {
@ -4687,7 +4687,7 @@ declare var Reflect: {
getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
getPrototypeOf(target: any): any;
has(target: any, propertyKey: string): boolean;
has(target: any, propertyKey: Symbol): boolean;
has(target: any, propertyKey: symbol): boolean;
isExtensible(target: any): boolean;
ownKeys(target: any): Array<PropertyKey>;
preventExtensions(target: any): boolean;

78
bin/lib.es6.d.ts vendored
View File

@ -1164,7 +1164,7 @@ interface ArrayConstructor {
}
declare var Array: ArrayConstructor;
declare type PropertyKey = string | number | Symbol;
declare type PropertyKey = string | number | symbol;
interface Symbol {
/** Returns a string representation of an object. */
@ -1173,7 +1173,7 @@ interface Symbol {
/** Returns the primitive value of the specified object. */
valueOf(): Object;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface SymbolConstructor {
@ -1186,21 +1186,21 @@ interface SymbolConstructor {
* Returns a new unique Symbol value.
* @param description Description of the new Symbol object.
*/
(description?: string|number): Symbol;
(description?: string|number): symbol;
/**
* Returns a Symbol object from the global symbol registry matching the given key if found.
* Otherwise, returns a new symbol with this key.
* @param key key to search for.
*/
for(key: string): Symbol;
for(key: string): symbol;
/**
* Returns a key from the global symbol registry matching the given Symbol if found.
* Otherwise, returns a undefined.
* @param sym Symbol to find the key for.
*/
keyFor(sym: Symbol): string;
keyFor(sym: symbol): string;
// Well-known Symbols
@ -1208,42 +1208,42 @@ interface SymbolConstructor {
* A method that determines if a constructor object recognizes an object as one of the
* constructors instances. Called by the semantics of the instanceof operator.
*/
hasInstance: Symbol;
hasInstance: symbol;
/**
* A Boolean value that if true indicates that an object should flatten to its array elements
* by Array.prototype.concat.
*/
isConcatSpreadable: Symbol;
isConcatSpreadable: symbol;
/**
* A Boolean value that if true indicates that an object may be used as a regular expression.
*/
isRegExp: Symbol;
isRegExp: symbol;
/**
* A method that returns the default iterator for an object.Called by the semantics of the
* for-of statement.
*/
iterator: Symbol;
iterator: symbol;
/**
* A method that converts an object to a corresponding primitive value.Called by the ToPrimitive
* abstract operation.
*/
toPrimitive: Symbol;
toPrimitive: symbol;
/**
* A String value that is used in the creation of the default string description of an object.
* Called by the built- in method Object.prototype.toString.
*/
toStringTag: Symbol;
toStringTag: symbol;
/**
* An Object whose own property names are property names that are excluded from the with
* environment bindings of the associated objects.
*/
unscopables: Symbol;
unscopables: symbol;
}
declare var Symbol: SymbolConstructor;
@ -1274,7 +1274,7 @@ interface ObjectConstructor {
* Returns an array of all symbol properties found directly on object o.
* @param o Object to retrieve the symbols from.
*/
getOwnPropertySymbols(o: any): Symbol[];
getOwnPropertySymbols(o: any): symbol[];
/**
* Returns true if the values are the same value, false otherwise.
@ -1396,7 +1396,7 @@ interface ArrayLike<T> {
interface Array<T> {
/** Iterator */
// [Symbol.iterator] (): Iterator<T>;
[Symbol.iterator] (): Iterator<T>;
/**
* Returns an array of key, value pairs for every entry in the array
@ -1495,7 +1495,7 @@ interface ArrayConstructor {
interface String {
/** Iterator */
// [Symbol.iterator] (): Iterator<string>;
[Symbol.iterator] (): Iterator<string>;
/**
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
@ -1613,12 +1613,12 @@ interface IteratorResult<T> {
}
interface Iterator<T> {
//[Symbol.iterator](): Iterator<T>;
[Symbol.iterator](): Iterator<T>;
next(): IteratorResult<T>;
}
interface Iterable<T> {
//[Symbol.iterator](): Iterator<T>;
[Symbol.iterator](): Iterator<T>;
}
interface GeneratorFunction extends Function {
@ -1640,7 +1640,7 @@ interface Generator<T> extends Iterator<T> {
next(value?: any): IteratorResult<T>;
throw (exception: any): IteratorResult<T>;
return (value: T): IteratorResult<T>;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface Math {
@ -1754,11 +1754,11 @@ interface Math {
*/
cbrt(x: number): number;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface RegExp {
// [Symbol.isRegExp]: boolean;
[Symbol.isRegExp]: boolean;
/**
* Matches a string with a regular expression, and returns an array containing the results of
@ -1815,8 +1815,8 @@ interface Map<K, V> {
set(key: K, value?: V): Map<K, V>;
size: number;
values(): Iterator<V>;
// [Symbol.iterator]():Iterator<[K,V]>;
// [Symbol.toStringTag]: string;
[Symbol.iterator]():Iterator<[K,V]>;
[Symbol.toStringTag]: string;
}
interface MapConstructor {
@ -1832,7 +1832,7 @@ interface WeakMap<K, V> {
get(key: K): V;
has(key: K): boolean;
set(key: K, value?: V): WeakMap<K, V>;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface WeakMapConstructor {
@ -1852,8 +1852,8 @@ interface Set<T> {
keys(): Iterator<T>;
size: number;
values(): Iterator<T>;
// [Symbol.iterator]():Iterator<T>;
// [Symbol.toStringTag]: string;
[Symbol.iterator]():Iterator<T>;
[Symbol.toStringTag]: string;
}
interface SetConstructor {
@ -1868,7 +1868,7 @@ interface WeakSet<T> {
clear(): void;
delete(value: T): boolean;
has(value: T): boolean;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface WeakSetConstructor {
@ -1879,7 +1879,7 @@ interface WeakSetConstructor {
declare var WeakSet: WeakSetConstructor;
interface JSON {
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
/**
@ -1899,7 +1899,7 @@ interface ArrayBuffer {
*/
slice(begin: number, end?: number): ArrayBuffer;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface ArrayBufferConstructor {
@ -2036,7 +2036,7 @@ interface DataView {
*/
setUint32(byteOffset: number, value: number, littleEndian: boolean): void;
// [Symbol.toStringTag]: string;
[Symbol.toStringTag]: string;
}
interface DataViewConstructor {
@ -2303,7 +2303,7 @@ interface Int8Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Int8ArrayConstructor {
@ -2593,7 +2593,7 @@ interface Uint8Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Uint8ArrayConstructor {
@ -2883,7 +2883,7 @@ interface Uint8ClampedArray {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Uint8ClampedArrayConstructor {
@ -3173,7 +3173,7 @@ interface Int16Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Int16ArrayConstructor {
@ -3463,7 +3463,7 @@ interface Uint16Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Uint16ArrayConstructor {
@ -3753,7 +3753,7 @@ interface Int32Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Int32ArrayConstructor {
@ -4043,7 +4043,7 @@ interface Uint32Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Uint32ArrayConstructor {
@ -4333,7 +4333,7 @@ interface Float32Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Float32ArrayConstructor {
@ -4623,7 +4623,7 @@ interface Float64Array {
values(): Iterator<number>;
[index: number]: number;
// [Symbol.iterator] (): Iterator<number>;
[Symbol.iterator] (): Iterator<number>;
}
interface Float64ArrayConstructor {
@ -4687,7 +4687,7 @@ declare var Reflect: {
getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
getPrototypeOf(target: any): any;
has(target: any, propertyKey: string): boolean;
has(target: any, propertyKey: Symbol): boolean;
has(target: any, propertyKey: symbol): boolean;
isExtensible(target: any): boolean;
ownKeys(target: any): Array<PropertyKey>;
preventExtensions(target: any): boolean;

4302
bin/tsc.js

File diff suppressed because it is too large Load Diff

240
bin/typescript.d.ts vendored
View File

@ -142,110 +142,113 @@ declare module "typescript" {
NumberKeyword = 117,
SetKeyword = 118,
StringKeyword = 119,
TypeKeyword = 120,
QualifiedName = 121,
ComputedPropertyName = 122,
TypeParameter = 123,
Parameter = 124,
PropertySignature = 125,
PropertyDeclaration = 126,
MethodSignature = 127,
MethodDeclaration = 128,
Constructor = 129,
GetAccessor = 130,
SetAccessor = 131,
CallSignature = 132,
ConstructSignature = 133,
IndexSignature = 134,
TypeReference = 135,
FunctionType = 136,
ConstructorType = 137,
TypeQuery = 138,
TypeLiteral = 139,
ArrayType = 140,
TupleType = 141,
UnionType = 142,
ParenthesizedType = 143,
ObjectBindingPattern = 144,
ArrayBindingPattern = 145,
BindingElement = 146,
ArrayLiteralExpression = 147,
ObjectLiteralExpression = 148,
PropertyAccessExpression = 149,
ElementAccessExpression = 150,
CallExpression = 151,
NewExpression = 152,
TaggedTemplateExpression = 153,
TypeAssertionExpression = 154,
ParenthesizedExpression = 155,
FunctionExpression = 156,
ArrowFunction = 157,
DeleteExpression = 158,
TypeOfExpression = 159,
VoidExpression = 160,
PrefixUnaryExpression = 161,
PostfixUnaryExpression = 162,
BinaryExpression = 163,
ConditionalExpression = 164,
TemplateExpression = 165,
YieldExpression = 166,
SpreadElementExpression = 167,
OmittedExpression = 168,
TemplateSpan = 169,
Block = 170,
VariableStatement = 171,
EmptyStatement = 172,
ExpressionStatement = 173,
IfStatement = 174,
DoStatement = 175,
WhileStatement = 176,
ForStatement = 177,
ForInStatement = 178,
ContinueStatement = 179,
BreakStatement = 180,
ReturnStatement = 181,
WithStatement = 182,
SwitchStatement = 183,
LabeledStatement = 184,
ThrowStatement = 185,
TryStatement = 186,
DebuggerStatement = 187,
VariableDeclaration = 188,
VariableDeclarationList = 189,
FunctionDeclaration = 190,
ClassDeclaration = 191,
InterfaceDeclaration = 192,
TypeAliasDeclaration = 193,
EnumDeclaration = 194,
ModuleDeclaration = 195,
ModuleBlock = 196,
ImportDeclaration = 197,
ExportAssignment = 198,
ExternalModuleReference = 199,
CaseClause = 200,
DefaultClause = 201,
HeritageClause = 202,
CatchClause = 203,
PropertyAssignment = 204,
ShorthandPropertyAssignment = 205,
EnumMember = 206,
SourceFile = 207,
SyntaxList = 208,
Count = 209,
SymbolKeyword = 120,
TypeKeyword = 121,
OfKeyword = 122,
QualifiedName = 123,
ComputedPropertyName = 124,
TypeParameter = 125,
Parameter = 126,
PropertySignature = 127,
PropertyDeclaration = 128,
MethodSignature = 129,
MethodDeclaration = 130,
Constructor = 131,
GetAccessor = 132,
SetAccessor = 133,
CallSignature = 134,
ConstructSignature = 135,
IndexSignature = 136,
TypeReference = 137,
FunctionType = 138,
ConstructorType = 139,
TypeQuery = 140,
TypeLiteral = 141,
ArrayType = 142,
TupleType = 143,
UnionType = 144,
ParenthesizedType = 145,
ObjectBindingPattern = 146,
ArrayBindingPattern = 147,
BindingElement = 148,
ArrayLiteralExpression = 149,
ObjectLiteralExpression = 150,
PropertyAccessExpression = 151,
ElementAccessExpression = 152,
CallExpression = 153,
NewExpression = 154,
TaggedTemplateExpression = 155,
TypeAssertionExpression = 156,
ParenthesizedExpression = 157,
FunctionExpression = 158,
ArrowFunction = 159,
DeleteExpression = 160,
TypeOfExpression = 161,
VoidExpression = 162,
PrefixUnaryExpression = 163,
PostfixUnaryExpression = 164,
BinaryExpression = 165,
ConditionalExpression = 166,
TemplateExpression = 167,
YieldExpression = 168,
SpreadElementExpression = 169,
OmittedExpression = 170,
TemplateSpan = 171,
Block = 172,
VariableStatement = 173,
EmptyStatement = 174,
ExpressionStatement = 175,
IfStatement = 176,
DoStatement = 177,
WhileStatement = 178,
ForStatement = 179,
ForInStatement = 180,
ForOfStatement = 181,
ContinueStatement = 182,
BreakStatement = 183,
ReturnStatement = 184,
WithStatement = 185,
SwitchStatement = 186,
LabeledStatement = 187,
ThrowStatement = 188,
TryStatement = 189,
DebuggerStatement = 190,
VariableDeclaration = 191,
VariableDeclarationList = 192,
FunctionDeclaration = 193,
ClassDeclaration = 194,
InterfaceDeclaration = 195,
TypeAliasDeclaration = 196,
EnumDeclaration = 197,
ModuleDeclaration = 198,
ModuleBlock = 199,
ImportDeclaration = 200,
ExportAssignment = 201,
ExternalModuleReference = 202,
CaseClause = 203,
DefaultClause = 204,
HeritageClause = 205,
CatchClause = 206,
PropertyAssignment = 207,
ShorthandPropertyAssignment = 208,
EnumMember = 209,
SourceFile = 210,
SyntaxList = 211,
Count = 212,
FirstAssignment = 52,
LastAssignment = 63,
FirstReservedWord = 65,
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 120,
LastKeyword = 122,
FirstFutureReservedWord = 101,
LastFutureReservedWord = 109,
FirstTypeNode = 135,
LastTypeNode = 143,
FirstTypeNode = 137,
LastTypeNode = 145,
FirstPunctuation = 14,
LastPunctuation = 63,
FirstToken = 0,
LastToken = 120,
LastToken = 122,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
@ -254,7 +257,7 @@ declare module "typescript" {
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 63,
FirstNode = 121,
FirstNode = 123,
}
const enum NodeFlags {
Export = 1,
@ -487,7 +490,7 @@ declare module "typescript" {
}
interface BinaryExpression extends Expression {
left: Expression;
operator: SyntaxKind;
operatorToken: Node;
right: Expression;
}
interface ConditionalExpression extends Expression {
@ -585,6 +588,10 @@ declare module "typescript" {
initializer: VariableDeclarationList | Expression;
expression: Expression;
}
interface ForOfStatement extends IterationStatement {
initializer: VariableDeclarationList | Expression;
expression: Expression;
}
interface BreakOrContinueStatement extends Statement {
label?: Identifier;
}
@ -994,8 +1001,9 @@ declare module "typescript" {
ObjectLiteral = 131072,
ContainsUndefinedOrNull = 262144,
ContainsObjectLiteral = 524288,
Intrinsic = 127,
Primitive = 510,
ESSymbol = 1048576,
Intrinsic = 1048703,
Primitive = 1049086,
StringLike = 258,
NumberLike = 132,
ObjectType = 48128,
@ -1281,6 +1289,7 @@ declare module "typescript" {
equals = 61,
exclamation = 33,
greaterThan = 62,
hash = 35,
lessThan = 60,
minus = 45,
openBrace = 123,
@ -1347,8 +1356,8 @@ declare module "typescript" {
}
function tokenToString(t: SyntaxKind): string;
function computeLineStarts(text: string): number[];
function getPositionFromLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
function computePositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number;
function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
function computePositionOfLineAndCharacter(lineStarts: number[], line: number, character: number): number;
function getLineStarts(sourceFile: SourceFile): number[];
function computeLineAndCharacterOfPosition(lineStarts: number[], position: number): {
line: number;
@ -1432,9 +1441,9 @@ declare module "typescript" {
scriptSnapshot: IScriptSnapshot;
nameTable: Map<string>;
getNamedDeclarations(): Declaration[];
getLineAndCharacterFromPosition(pos: number): LineAndCharacter;
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
getLineStarts(): number[];
getPositionFromLineAndCharacter(line: number, character: number): number;
getPositionOfLineAndCharacter(line: number, character: number): number;
update(newText: string, textChangeRange: TextChangeRange): SourceFile;
}
/**
@ -1496,7 +1505,7 @@ declare module "typescript" {
getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[];
getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[];
getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[];
getNavigateToItems(searchValue: string): NavigateToItem[];
getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[];
getNavigationBarItems(fileName: string): NavigationBarItem[];
getOutliningSpans(fileName: string): OutliningSpan[];
getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
@ -1571,6 +1580,7 @@ declare module "typescript" {
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
PlaceOpenBraceOnNewLineForFunctions: boolean;
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
[s: string]: boolean | number | string;
}
interface DefinitionInfo {
fileName: string;
@ -1704,6 +1714,9 @@ declare module "typescript" {
InMultiLineCommentTrivia = 1,
InSingleQuoteStringLiteral = 2,
InDoubleQuoteStringLiteral = 3,
InTemplateHeadOrNoSubstitutionTemplate = 4,
InTemplateMiddleOrTail = 5,
InTemplateSubstitutionPosition = 6,
}
enum TokenClass {
Punctuation = 0,
@ -1725,7 +1738,26 @@ declare module "typescript" {
classification: TokenClass;
}
interface Classifier {
getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult;
/**
* Gives lexical classifications of tokens on a line without any syntactic context.
* For instance, a token consisting of the text 'string' can be either an identifier
* named 'string' or the keyword 'string', however, because this classifier is not aware,
* it relies on certain heuristics to give acceptable results. For classifications where
* speed trumps accuracy, this function is preferable; however, for true accuracy, the
* syntactic classifier is ideal. In fact, in certain editing scenarios, combining the
* lexical, syntactic, and semantic classifiers may issue the best user experience.
*
* @param text The text of a line to classify.
* @param lexState The state of the lexical classifier at the end of the previous line.
* @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier.
* If there is no syntactic classifier (syntacticClassifierAbsent=true),
* certain heuristics may be used in its place; however, if there is a
* syntactic classifier (syntacticClassifierAbsent=false), certain
* classifications which may be incorrectly categorized will be given
* back as Identifiers in order to allow the syntactic classifier to
* subsume the classification.
*/
getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
}
/**
* The document registry represents a store of SourceFile objects that can be shared between

30159
bin/typescript.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -142,110 +142,113 @@ declare module ts {
NumberKeyword = 117,
SetKeyword = 118,
StringKeyword = 119,
TypeKeyword = 120,
QualifiedName = 121,
ComputedPropertyName = 122,
TypeParameter = 123,
Parameter = 124,
PropertySignature = 125,
PropertyDeclaration = 126,
MethodSignature = 127,
MethodDeclaration = 128,
Constructor = 129,
GetAccessor = 130,
SetAccessor = 131,
CallSignature = 132,
ConstructSignature = 133,
IndexSignature = 134,
TypeReference = 135,
FunctionType = 136,
ConstructorType = 137,
TypeQuery = 138,
TypeLiteral = 139,
ArrayType = 140,
TupleType = 141,
UnionType = 142,
ParenthesizedType = 143,
ObjectBindingPattern = 144,
ArrayBindingPattern = 145,
BindingElement = 146,
ArrayLiteralExpression = 147,
ObjectLiteralExpression = 148,
PropertyAccessExpression = 149,
ElementAccessExpression = 150,
CallExpression = 151,
NewExpression = 152,
TaggedTemplateExpression = 153,
TypeAssertionExpression = 154,
ParenthesizedExpression = 155,
FunctionExpression = 156,
ArrowFunction = 157,
DeleteExpression = 158,
TypeOfExpression = 159,
VoidExpression = 160,
PrefixUnaryExpression = 161,
PostfixUnaryExpression = 162,
BinaryExpression = 163,
ConditionalExpression = 164,
TemplateExpression = 165,
YieldExpression = 166,
SpreadElementExpression = 167,
OmittedExpression = 168,
TemplateSpan = 169,
Block = 170,
VariableStatement = 171,
EmptyStatement = 172,
ExpressionStatement = 173,
IfStatement = 174,
DoStatement = 175,
WhileStatement = 176,
ForStatement = 177,
ForInStatement = 178,
ContinueStatement = 179,
BreakStatement = 180,
ReturnStatement = 181,
WithStatement = 182,
SwitchStatement = 183,
LabeledStatement = 184,
ThrowStatement = 185,
TryStatement = 186,
DebuggerStatement = 187,
VariableDeclaration = 188,
VariableDeclarationList = 189,
FunctionDeclaration = 190,
ClassDeclaration = 191,
InterfaceDeclaration = 192,
TypeAliasDeclaration = 193,
EnumDeclaration = 194,
ModuleDeclaration = 195,
ModuleBlock = 196,
ImportDeclaration = 197,
ExportAssignment = 198,
ExternalModuleReference = 199,
CaseClause = 200,
DefaultClause = 201,
HeritageClause = 202,
CatchClause = 203,
PropertyAssignment = 204,
ShorthandPropertyAssignment = 205,
EnumMember = 206,
SourceFile = 207,
SyntaxList = 208,
Count = 209,
SymbolKeyword = 120,
TypeKeyword = 121,
OfKeyword = 122,
QualifiedName = 123,
ComputedPropertyName = 124,
TypeParameter = 125,
Parameter = 126,
PropertySignature = 127,
PropertyDeclaration = 128,
MethodSignature = 129,
MethodDeclaration = 130,
Constructor = 131,
GetAccessor = 132,
SetAccessor = 133,
CallSignature = 134,
ConstructSignature = 135,
IndexSignature = 136,
TypeReference = 137,
FunctionType = 138,
ConstructorType = 139,
TypeQuery = 140,
TypeLiteral = 141,
ArrayType = 142,
TupleType = 143,
UnionType = 144,
ParenthesizedType = 145,
ObjectBindingPattern = 146,
ArrayBindingPattern = 147,
BindingElement = 148,
ArrayLiteralExpression = 149,
ObjectLiteralExpression = 150,
PropertyAccessExpression = 151,
ElementAccessExpression = 152,
CallExpression = 153,
NewExpression = 154,
TaggedTemplateExpression = 155,
TypeAssertionExpression = 156,
ParenthesizedExpression = 157,
FunctionExpression = 158,
ArrowFunction = 159,
DeleteExpression = 160,
TypeOfExpression = 161,
VoidExpression = 162,
PrefixUnaryExpression = 163,
PostfixUnaryExpression = 164,
BinaryExpression = 165,
ConditionalExpression = 166,
TemplateExpression = 167,
YieldExpression = 168,
SpreadElementExpression = 169,
OmittedExpression = 170,
TemplateSpan = 171,
Block = 172,
VariableStatement = 173,
EmptyStatement = 174,
ExpressionStatement = 175,
IfStatement = 176,
DoStatement = 177,
WhileStatement = 178,
ForStatement = 179,
ForInStatement = 180,
ForOfStatement = 181,
ContinueStatement = 182,
BreakStatement = 183,
ReturnStatement = 184,
WithStatement = 185,
SwitchStatement = 186,
LabeledStatement = 187,
ThrowStatement = 188,
TryStatement = 189,
DebuggerStatement = 190,
VariableDeclaration = 191,
VariableDeclarationList = 192,
FunctionDeclaration = 193,
ClassDeclaration = 194,
InterfaceDeclaration = 195,
TypeAliasDeclaration = 196,
EnumDeclaration = 197,
ModuleDeclaration = 198,
ModuleBlock = 199,
ImportDeclaration = 200,
ExportAssignment = 201,
ExternalModuleReference = 202,
CaseClause = 203,
DefaultClause = 204,
HeritageClause = 205,
CatchClause = 206,
PropertyAssignment = 207,
ShorthandPropertyAssignment = 208,
EnumMember = 209,
SourceFile = 210,
SyntaxList = 211,
Count = 212,
FirstAssignment = 52,
LastAssignment = 63,
FirstReservedWord = 65,
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 120,
LastKeyword = 122,
FirstFutureReservedWord = 101,
LastFutureReservedWord = 109,
FirstTypeNode = 135,
LastTypeNode = 143,
FirstTypeNode = 137,
LastTypeNode = 145,
FirstPunctuation = 14,
LastPunctuation = 63,
FirstToken = 0,
LastToken = 120,
LastToken = 122,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
@ -254,7 +257,7 @@ declare module ts {
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 63,
FirstNode = 121,
FirstNode = 123,
}
const enum NodeFlags {
Export = 1,
@ -487,7 +490,7 @@ declare module ts {
}
interface BinaryExpression extends Expression {
left: Expression;
operator: SyntaxKind;
operatorToken: Node;
right: Expression;
}
interface ConditionalExpression extends Expression {
@ -585,6 +588,10 @@ declare module ts {
initializer: VariableDeclarationList | Expression;
expression: Expression;
}
interface ForOfStatement extends IterationStatement {
initializer: VariableDeclarationList | Expression;
expression: Expression;
}
interface BreakOrContinueStatement extends Statement {
label?: Identifier;
}
@ -994,8 +1001,9 @@ declare module ts {
ObjectLiteral = 131072,
ContainsUndefinedOrNull = 262144,
ContainsObjectLiteral = 524288,
Intrinsic = 127,
Primitive = 510,
ESSymbol = 1048576,
Intrinsic = 1048703,
Primitive = 1049086,
StringLike = 258,
NumberLike = 132,
ObjectType = 48128,
@ -1281,6 +1289,7 @@ declare module ts {
equals = 61,
exclamation = 33,
greaterThan = 62,
hash = 35,
lessThan = 60,
minus = 45,
openBrace = 123,
@ -1347,8 +1356,8 @@ declare module ts {
}
function tokenToString(t: SyntaxKind): string;
function computeLineStarts(text: string): number[];
function getPositionFromLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
function computePositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number;
function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
function computePositionOfLineAndCharacter(lineStarts: number[], line: number, character: number): number;
function getLineStarts(sourceFile: SourceFile): number[];
function computeLineAndCharacterOfPosition(lineStarts: number[], position: number): {
line: number;
@ -1432,9 +1441,9 @@ declare module ts {
scriptSnapshot: IScriptSnapshot;
nameTable: Map<string>;
getNamedDeclarations(): Declaration[];
getLineAndCharacterFromPosition(pos: number): LineAndCharacter;
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
getLineStarts(): number[];
getPositionFromLineAndCharacter(line: number, character: number): number;
getPositionOfLineAndCharacter(line: number, character: number): number;
update(newText: string, textChangeRange: TextChangeRange): SourceFile;
}
/**
@ -1496,7 +1505,7 @@ declare module ts {
getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[];
getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[];
getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[];
getNavigateToItems(searchValue: string): NavigateToItem[];
getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[];
getNavigationBarItems(fileName: string): NavigationBarItem[];
getOutliningSpans(fileName: string): OutliningSpan[];
getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
@ -1571,6 +1580,7 @@ declare module ts {
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
PlaceOpenBraceOnNewLineForFunctions: boolean;
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
[s: string]: boolean | number | string;
}
interface DefinitionInfo {
fileName: string;
@ -1704,6 +1714,9 @@ declare module ts {
InMultiLineCommentTrivia = 1,
InSingleQuoteStringLiteral = 2,
InDoubleQuoteStringLiteral = 3,
InTemplateHeadOrNoSubstitutionTemplate = 4,
InTemplateMiddleOrTail = 5,
InTemplateSubstitutionPosition = 6,
}
enum TokenClass {
Punctuation = 0,
@ -1725,7 +1738,26 @@ declare module ts {
classification: TokenClass;
}
interface Classifier {
getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult;
/**
* Gives lexical classifications of tokens on a line without any syntactic context.
* For instance, a token consisting of the text 'string' can be either an identifier
* named 'string' or the keyword 'string', however, because this classifier is not aware,
* it relies on certain heuristics to give acceptable results. For classifications where
* speed trumps accuracy, this function is preferable; however, for true accuracy, the
* syntactic classifier is ideal. In fact, in certain editing scenarios, combining the
* lexical, syntactic, and semantic classifiers may issue the best user experience.
*
* @param text The text of a line to classify.
* @param lexState The state of the lexical classifier at the end of the previous line.
* @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier.
* If there is no syntactic classifier (syntacticClassifierAbsent=true),
* certain heuristics may be used in its place; however, if there is a
* syntactic classifier (syntacticClassifierAbsent=false), certain
* classifications which may be incorrectly categorized will be given
* back as Identifiers in order to allow the syntactic classifier to
* subsume the classification.
*/
getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
}
/**
* The document registry represents a store of SourceFile objects that can be shared between

File diff suppressed because it is too large Load Diff

View File

@ -159,6 +159,7 @@ declare module ts {
function getFullWidth(node: Node): number;
function containsParseError(node: Node): boolean;
function getSourceFileOfNode(node: Node): SourceFile;
function getStartPositionOfLine(line: number, sourceFile: SourceFile): number;
function nodePosToString(node: Node): string;
function getStartPosOfNode(node: Node): number;
function nodeIsMissing(node: Node): boolean;
@ -216,6 +217,26 @@ declare module ts {
function getFileReferenceFromReferencePath(comment: string, commentRange: CommentRange): ReferencePathMatchResult;
function isKeyword(token: SyntaxKind): boolean;
function isTrivia(token: SyntaxKind): boolean;
/**
* A declaration has a dynamic name if both of the following are true:
* 1. The declaration has a computed property name
* 2. The computed name is *not* expressed as Symbol.<name>, where name
* is a property of the Symbol constructor that denotes a built in
* Symbol.
*/
function hasDynamicName(declaration: Declaration): boolean;
/**
* Checks if the expression is of the form:
* Symbol.name
* where Symbol is literally the word "Symbol", and name is any identifierName
*/
function isWellKnownSymbolSyntactically(node: Expression): boolean;
function getPropertyNameForPropertyNameNode(name: DeclarationName): string;
function getPropertyNameForKnownSymbolName(symbolName: string): string;
/**
* Includes the word "Symbol" with unicode escapes
*/
function isESSymbolIdentifier(node: Node): boolean;
function isModifier(token: SyntaxKind): boolean;
function textSpanEnd(span: TextSpan): number;
function textSpanIsEmpty(span: TextSpan): boolean;
@ -255,8 +276,7 @@ declare module ts {
list: Node;
}
function getEndLinePosition(line: number, sourceFile: SourceFile): number;
function getStartPositionOfLine(line: number, sourceFile: SourceFile): number;
function getStartLinePositionForPosition(position: number, sourceFile: SourceFile): number;
function getLineStartPositionForPosition(position: number, sourceFile: SourceFile): number;
function rangeContainsRange(r1: TextRange, r2: TextRange): boolean;
function startEndContainsRange(start: number, end: number, range: TextRange): boolean;
function rangeContainsStartEnd(range: TextRange, start: number, end: number): boolean;

View File

@ -159,6 +159,7 @@ declare module "typescript" {
function getFullWidth(node: Node): number;
function containsParseError(node: Node): boolean;
function getSourceFileOfNode(node: Node): SourceFile;
function getStartPositionOfLine(line: number, sourceFile: SourceFile): number;
function nodePosToString(node: Node): string;
function getStartPosOfNode(node: Node): number;
function nodeIsMissing(node: Node): boolean;
@ -216,6 +217,26 @@ declare module "typescript" {
function getFileReferenceFromReferencePath(comment: string, commentRange: CommentRange): ReferencePathMatchResult;
function isKeyword(token: SyntaxKind): boolean;
function isTrivia(token: SyntaxKind): boolean;
/**
* A declaration has a dynamic name if both of the following are true:
* 1. The declaration has a computed property name
* 2. The computed name is *not* expressed as Symbol.<name>, where name
* is a property of the Symbol constructor that denotes a built in
* Symbol.
*/
function hasDynamicName(declaration: Declaration): boolean;
/**
* Checks if the expression is of the form:
* Symbol.name
* where Symbol is literally the word "Symbol", and name is any identifierName
*/
function isWellKnownSymbolSyntactically(node: Expression): boolean;
function getPropertyNameForPropertyNameNode(name: DeclarationName): string;
function getPropertyNameForKnownSymbolName(symbolName: string): string;
/**
* Includes the word "Symbol" with unicode escapes
*/
function isESSymbolIdentifier(node: Node): boolean;
function isModifier(token: SyntaxKind): boolean;
function textSpanEnd(span: TextSpan): number;
function textSpanIsEmpty(span: TextSpan): boolean;
@ -255,8 +276,7 @@ declare module "typescript" {
list: Node;
}
function getEndLinePosition(line: number, sourceFile: SourceFile): number;
function getStartPositionOfLine(line: number, sourceFile: SourceFile): number;
function getStartLinePositionForPosition(position: number, sourceFile: SourceFile): number;
function getLineStartPositionForPosition(position: number, sourceFile: SourceFile): number;
function rangeContainsRange(r1: TextRange, r2: TextRange): boolean;
function startEndContainsRange(start: number, end: number, range: TextRange): boolean;
function rangeContainsStartEnd(range: TextRange, start: number, end: number): boolean;