Update LKG

This commit is contained in:
Mohamed Hegazy 2015-03-27 15:44:57 -07:00
parent 4894fee7d3
commit 20d892a7a8
12 changed files with 30981 additions and 23428 deletions

14
bin/lib.core.d.ts vendored
View File

@ -1170,3 +1170,17 @@ interface ArrayConstructor {
}
declare var Array: ArrayConstructor;
interface TypedPropertyDescriptor<T> {
enumerable?: boolean;
configurable?: boolean;
writable?: boolean;
value?: T;
get?: () => T;
set?: (value: T) => void;
}
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Function, propertyKey: string | symbol, parameterIndex: number) => void;

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

@ -1170,6 +1170,20 @@ interface ArrayConstructor {
}
declare var Array: ArrayConstructor;
interface TypedPropertyDescriptor<T> {
enumerable?: boolean;
configurable?: boolean;
writable?: boolean;
value?: T;
get?: () => T;
set?: (value: T) => void;
}
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Function, propertyKey: string | symbol, parameterIndex: number) => void;
declare type PropertyKey = string | number | symbol;
interface Symbol {

14
bin/lib.d.ts vendored
View File

@ -1171,6 +1171,20 @@ interface ArrayConstructor {
declare var Array: ArrayConstructor;
interface TypedPropertyDescriptor<T> {
enumerable?: boolean;
configurable?: boolean;
writable?: boolean;
value?: T;
get?: () => T;
set?: (value: T) => void;
}
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Function, propertyKey: string | symbol, parameterIndex: number) => void;
/////////////////////////////
/// IE10 ECMAScript Extensions
/////////////////////////////

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

@ -1170,6 +1170,20 @@ interface ArrayConstructor {
}
declare var Array: ArrayConstructor;
interface TypedPropertyDescriptor<T> {
enumerable?: boolean;
configurable?: boolean;
writable?: boolean;
value?: T;
get?: () => T;
set?: (value: T) => void;
}
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Function, propertyKey: string | symbol, parameterIndex: number) => void;
declare type PropertyKey = string | number | symbol;
interface Symbol {

9125
bin/tsc.js

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

440
bin/typescript.d.ts vendored
View File

@ -74,192 +74,195 @@ declare module "typescript" {
BarBarToken = 49,
QuestionToken = 50,
ColonToken = 51,
EqualsToken = 52,
PlusEqualsToken = 53,
MinusEqualsToken = 54,
AsteriskEqualsToken = 55,
SlashEqualsToken = 56,
PercentEqualsToken = 57,
LessThanLessThanEqualsToken = 58,
GreaterThanGreaterThanEqualsToken = 59,
GreaterThanGreaterThanGreaterThanEqualsToken = 60,
AmpersandEqualsToken = 61,
BarEqualsToken = 62,
CaretEqualsToken = 63,
Identifier = 64,
BreakKeyword = 65,
CaseKeyword = 66,
CatchKeyword = 67,
ClassKeyword = 68,
ConstKeyword = 69,
ContinueKeyword = 70,
DebuggerKeyword = 71,
DefaultKeyword = 72,
DeleteKeyword = 73,
DoKeyword = 74,
ElseKeyword = 75,
EnumKeyword = 76,
ExportKeyword = 77,
ExtendsKeyword = 78,
FalseKeyword = 79,
FinallyKeyword = 80,
ForKeyword = 81,
FunctionKeyword = 82,
IfKeyword = 83,
ImportKeyword = 84,
InKeyword = 85,
InstanceOfKeyword = 86,
NewKeyword = 87,
NullKeyword = 88,
ReturnKeyword = 89,
SuperKeyword = 90,
SwitchKeyword = 91,
ThisKeyword = 92,
ThrowKeyword = 93,
TrueKeyword = 94,
TryKeyword = 95,
TypeOfKeyword = 96,
VarKeyword = 97,
VoidKeyword = 98,
WhileKeyword = 99,
WithKeyword = 100,
AsKeyword = 101,
ImplementsKeyword = 102,
InterfaceKeyword = 103,
LetKeyword = 104,
PackageKeyword = 105,
PrivateKeyword = 106,
ProtectedKeyword = 107,
PublicKeyword = 108,
StaticKeyword = 109,
YieldKeyword = 110,
AnyKeyword = 111,
BooleanKeyword = 112,
ConstructorKeyword = 113,
DeclareKeyword = 114,
GetKeyword = 115,
ModuleKeyword = 116,
RequireKeyword = 117,
NumberKeyword = 118,
SetKeyword = 119,
StringKeyword = 120,
SymbolKeyword = 121,
TypeKeyword = 122,
FromKeyword = 123,
OfKeyword = 124,
QualifiedName = 125,
ComputedPropertyName = 126,
TypeParameter = 127,
Parameter = 128,
PropertySignature = 129,
PropertyDeclaration = 130,
MethodSignature = 131,
MethodDeclaration = 132,
Constructor = 133,
GetAccessor = 134,
SetAccessor = 135,
CallSignature = 136,
ConstructSignature = 137,
IndexSignature = 138,
TypeReference = 139,
FunctionType = 140,
ConstructorType = 141,
TypeQuery = 142,
TypeLiteral = 143,
ArrayType = 144,
TupleType = 145,
UnionType = 146,
ParenthesizedType = 147,
ObjectBindingPattern = 148,
ArrayBindingPattern = 149,
BindingElement = 150,
ArrayLiteralExpression = 151,
ObjectLiteralExpression = 152,
PropertyAccessExpression = 153,
ElementAccessExpression = 154,
CallExpression = 155,
NewExpression = 156,
TaggedTemplateExpression = 157,
TypeAssertionExpression = 158,
ParenthesizedExpression = 159,
FunctionExpression = 160,
ArrowFunction = 161,
DeleteExpression = 162,
TypeOfExpression = 163,
VoidExpression = 164,
PrefixUnaryExpression = 165,
PostfixUnaryExpression = 166,
BinaryExpression = 167,
ConditionalExpression = 168,
TemplateExpression = 169,
YieldExpression = 170,
SpreadElementExpression = 171,
OmittedExpression = 172,
TemplateSpan = 173,
Block = 174,
VariableStatement = 175,
EmptyStatement = 176,
ExpressionStatement = 177,
IfStatement = 178,
DoStatement = 179,
WhileStatement = 180,
ForStatement = 181,
ForInStatement = 182,
ForOfStatement = 183,
ContinueStatement = 184,
BreakStatement = 185,
ReturnStatement = 186,
WithStatement = 187,
SwitchStatement = 188,
LabeledStatement = 189,
ThrowStatement = 190,
TryStatement = 191,
DebuggerStatement = 192,
VariableDeclaration = 193,
VariableDeclarationList = 194,
FunctionDeclaration = 195,
ClassDeclaration = 196,
InterfaceDeclaration = 197,
TypeAliasDeclaration = 198,
EnumDeclaration = 199,
ModuleDeclaration = 200,
ModuleBlock = 201,
CaseBlock = 202,
ImportEqualsDeclaration = 203,
ImportDeclaration = 204,
ImportClause = 205,
NamespaceImport = 206,
NamedImports = 207,
ImportSpecifier = 208,
ExportAssignment = 209,
ExportDeclaration = 210,
NamedExports = 211,
ExportSpecifier = 212,
ExternalModuleReference = 213,
CaseClause = 214,
DefaultClause = 215,
HeritageClause = 216,
CatchClause = 217,
PropertyAssignment = 218,
ShorthandPropertyAssignment = 219,
EnumMember = 220,
SourceFile = 221,
SyntaxList = 222,
Count = 223,
FirstAssignment = 52,
LastAssignment = 63,
FirstReservedWord = 65,
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 124,
FirstFutureReservedWord = 102,
LastFutureReservedWord = 110,
FirstTypeNode = 139,
LastTypeNode = 147,
AtToken = 52,
EqualsToken = 53,
PlusEqualsToken = 54,
MinusEqualsToken = 55,
AsteriskEqualsToken = 56,
SlashEqualsToken = 57,
PercentEqualsToken = 58,
LessThanLessThanEqualsToken = 59,
GreaterThanGreaterThanEqualsToken = 60,
GreaterThanGreaterThanGreaterThanEqualsToken = 61,
AmpersandEqualsToken = 62,
BarEqualsToken = 63,
CaretEqualsToken = 64,
Identifier = 65,
BreakKeyword = 66,
CaseKeyword = 67,
CatchKeyword = 68,
ClassKeyword = 69,
ConstKeyword = 70,
ContinueKeyword = 71,
DebuggerKeyword = 72,
DefaultKeyword = 73,
DeleteKeyword = 74,
DoKeyword = 75,
ElseKeyword = 76,
EnumKeyword = 77,
ExportKeyword = 78,
ExtendsKeyword = 79,
FalseKeyword = 80,
FinallyKeyword = 81,
ForKeyword = 82,
FunctionKeyword = 83,
IfKeyword = 84,
ImportKeyword = 85,
InKeyword = 86,
InstanceOfKeyword = 87,
NewKeyword = 88,
NullKeyword = 89,
ReturnKeyword = 90,
SuperKeyword = 91,
SwitchKeyword = 92,
ThisKeyword = 93,
ThrowKeyword = 94,
TrueKeyword = 95,
TryKeyword = 96,
TypeOfKeyword = 97,
VarKeyword = 98,
VoidKeyword = 99,
WhileKeyword = 100,
WithKeyword = 101,
AsKeyword = 102,
ImplementsKeyword = 103,
InterfaceKeyword = 104,
LetKeyword = 105,
PackageKeyword = 106,
PrivateKeyword = 107,
ProtectedKeyword = 108,
PublicKeyword = 109,
StaticKeyword = 110,
YieldKeyword = 111,
AnyKeyword = 112,
BooleanKeyword = 113,
ConstructorKeyword = 114,
DeclareKeyword = 115,
GetKeyword = 116,
ModuleKeyword = 117,
RequireKeyword = 118,
NumberKeyword = 119,
SetKeyword = 120,
StringKeyword = 121,
SymbolKeyword = 122,
TypeKeyword = 123,
FromKeyword = 124,
OfKeyword = 125,
QualifiedName = 126,
ComputedPropertyName = 127,
TypeParameter = 128,
Parameter = 129,
Decorator = 130,
PropertySignature = 131,
PropertyDeclaration = 132,
MethodSignature = 133,
MethodDeclaration = 134,
Constructor = 135,
GetAccessor = 136,
SetAccessor = 137,
CallSignature = 138,
ConstructSignature = 139,
IndexSignature = 140,
TypeReference = 141,
FunctionType = 142,
ConstructorType = 143,
TypeQuery = 144,
TypeLiteral = 145,
ArrayType = 146,
TupleType = 147,
UnionType = 148,
ParenthesizedType = 149,
ObjectBindingPattern = 150,
ArrayBindingPattern = 151,
BindingElement = 152,
ArrayLiteralExpression = 153,
ObjectLiteralExpression = 154,
PropertyAccessExpression = 155,
ElementAccessExpression = 156,
CallExpression = 157,
NewExpression = 158,
TaggedTemplateExpression = 159,
TypeAssertionExpression = 160,
ParenthesizedExpression = 161,
FunctionExpression = 162,
ArrowFunction = 163,
DeleteExpression = 164,
TypeOfExpression = 165,
VoidExpression = 166,
PrefixUnaryExpression = 167,
PostfixUnaryExpression = 168,
BinaryExpression = 169,
ConditionalExpression = 170,
TemplateExpression = 171,
YieldExpression = 172,
SpreadElementExpression = 173,
OmittedExpression = 174,
TemplateSpan = 175,
Block = 176,
VariableStatement = 177,
EmptyStatement = 178,
ExpressionStatement = 179,
IfStatement = 180,
DoStatement = 181,
WhileStatement = 182,
ForStatement = 183,
ForInStatement = 184,
ForOfStatement = 185,
ContinueStatement = 186,
BreakStatement = 187,
ReturnStatement = 188,
WithStatement = 189,
SwitchStatement = 190,
LabeledStatement = 191,
ThrowStatement = 192,
TryStatement = 193,
DebuggerStatement = 194,
VariableDeclaration = 195,
VariableDeclarationList = 196,
FunctionDeclaration = 197,
ClassDeclaration = 198,
InterfaceDeclaration = 199,
TypeAliasDeclaration = 200,
EnumDeclaration = 201,
ModuleDeclaration = 202,
ModuleBlock = 203,
CaseBlock = 204,
ImportEqualsDeclaration = 205,
ImportDeclaration = 206,
ImportClause = 207,
NamespaceImport = 208,
NamedImports = 209,
ImportSpecifier = 210,
ExportAssignment = 211,
ExportDeclaration = 212,
NamedExports = 213,
ExportSpecifier = 214,
MissingDeclaration = 215,
ExternalModuleReference = 216,
CaseClause = 217,
DefaultClause = 218,
HeritageClause = 219,
CatchClause = 220,
PropertyAssignment = 221,
ShorthandPropertyAssignment = 222,
EnumMember = 223,
SourceFile = 224,
SyntaxList = 225,
Count = 226,
FirstAssignment = 53,
LastAssignment = 64,
FirstReservedWord = 66,
LastReservedWord = 101,
FirstKeyword = 66,
LastKeyword = 125,
FirstFutureReservedWord = 103,
LastFutureReservedWord = 111,
FirstTypeNode = 141,
LastTypeNode = 149,
FirstPunctuation = 14,
LastPunctuation = 63,
LastPunctuation = 64,
FirstToken = 0,
LastToken = 124,
LastToken = 125,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
@ -267,8 +270,8 @@ declare module "typescript" {
FirstTemplateToken = 10,
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 63,
FirstNode = 125,
LastBinaryOperator = 64,
FirstNode = 126,
}
const enum NodeFlags {
Export = 1,
@ -284,6 +287,7 @@ declare module "typescript" {
Let = 4096,
Const = 8192,
OctalLiteral = 16384,
ExportContext = 32768,
Modifier = 499,
AccessibilityModifier = 112,
BlockScoped = 12288,
@ -293,10 +297,11 @@ declare module "typescript" {
DisallowIn = 2,
Yield = 4,
GeneratorParameter = 8,
ThisNodeHasError = 16,
ParserGeneratedFlags = 31,
ThisNodeOrAnySubNodesHasError = 32,
HasAggregatedChildData = 64,
Decorator = 16,
ThisNodeHasError = 32,
ParserGeneratedFlags = 63,
ThisNodeOrAnySubNodesHasError = 64,
HasAggregatedChildData = 128,
}
const enum RelationComparisonResult {
Succeeded = 1,
@ -307,6 +312,7 @@ declare module "typescript" {
kind: SyntaxKind;
flags: NodeFlags;
parserContextFlags?: ParserContextFlags;
decorators?: NodeArray<Decorator>;
modifiers?: ModifiersArray;
id?: number;
parent?: Node;
@ -337,6 +343,9 @@ declare module "typescript" {
interface ComputedPropertyName extends Node {
expression: Expression;
}
interface Decorator extends Node {
expression: LeftHandSideExpression;
}
interface TypeParameterDeclaration extends Declaration {
name: Identifier;
constraint?: TypeNode;
@ -516,6 +525,9 @@ declare module "typescript" {
name?: Identifier;
body: Block | Expression;
}
interface ArrowFunction extends Expression, FunctionLikeDeclaration {
equalsGreaterThanToken: Node;
}
interface LiteralExpression extends PrimaryExpression {
text: string;
isUnterminated?: boolean;
@ -725,7 +737,8 @@ declare module "typescript" {
type ExportSpecifier = ImportOrExportSpecifier;
interface ExportAssignment extends Declaration, ModuleElement {
isExportEquals?: boolean;
expression: Expression;
expression?: Expression;
type?: TypeNode;
}
interface FileReference extends TextRange {
fileName: string;
@ -760,14 +773,14 @@ declare module "typescript" {
interface Program extends ScriptReferenceHost {
getSourceFiles(): SourceFile[];
/**
* Emits the javascript and declaration files. If targetSourceFile is not specified, then
* the javascript and declaration files will be produced for all the files in this program.
* If targetSourceFile is specified, then only the javascript and declaration for that
* Emits the JavaScript and declaration files. If targetSourceFile is not specified, then
* the JavaScript and declaration files will be produced for all the files in this program.
* If targetSourceFile is specified, then only the JavaScript and declaration for that
* specific file will be generated.
*
* If writeFile is not specified then the writeFile callback from the compiler host will be
* used for writing the javascript and declaration files. Otherwise, the writeFile parameter
* will be invoked when writing the javascript and declaration files.
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
* will be invoked when writing the JavaScript and declaration files.
*/
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult;
getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[];
@ -886,9 +899,10 @@ declare module "typescript" {
NotAccessible = 1,
CannotBeNamed = 2,
}
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
interface SymbolVisibilityResult {
accessibility: SymbolAccessibility;
aliasesToMakeVisible?: ImportEqualsDeclaration[];
aliasesToMakeVisible?: AnyImportSyntax[];
errorSymbolName?: string;
errorNode?: Node;
}
@ -896,20 +910,22 @@ declare module "typescript" {
errorModuleName?: string;
}
interface EmitResolver {
getGeneratedNameForNode(node: Node): string;
getExpressionNameSubstitution(node: Identifier): string;
hasExportDefaultValue(node: SourceFile): boolean;
isReferencedAliasDeclaration(node: Node): boolean;
hasGlobalName(name: string): boolean;
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
isValueAliasDeclaration(node: Node): boolean;
isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean;
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
getNodeCheckFlags(node: Node): NodeCheckFlags;
isDeclarationVisible(node: Declaration): boolean;
collectLinkedAliases(node: Identifier): Node[];
isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
writeTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isUnknownIdentifier(location: Node, name: string): boolean;
resolvesToSomeValue(location: Node, name: string): boolean;
getBlockScopedVariableId(node: Identifier): number;
}
const enum SymbolFlags {
@ -1016,6 +1032,7 @@ declare module "typescript" {
ContextChecked = 64,
EnumValuesComputed = 128,
BlockScopedBindingInLoop = 256,
EmitDecorate = 512,
}
interface NodeLinks {
resolvedType?: Type;
@ -1135,17 +1152,6 @@ declare module "typescript" {
interface TypeMapper {
(t: Type): Type;
}
interface TypeInferences {
primary: Type[];
secondary: Type[];
}
interface InferenceContext {
typeParameters: TypeParameter[];
inferUnionTypes: boolean;
inferences: TypeInferences[];
inferredTypes: Type[];
failedTypeParameterIndex?: number;
}
interface DiagnosticMessage {
key: string;
category: DiagnosticCategory;
@ -1442,7 +1448,8 @@ declare module "typescript" {
declare module "typescript" {
/** The version of the TypeScript compiler release */
let version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function findConfigFile(searchPath: string): string;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
@ -1556,6 +1563,7 @@ declare module "typescript" {
getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[];
getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[];
getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[];
findReferences(fileName: string, position: number): ReferencedSymbol[];
getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[];
getNavigationBarItems(fileName: string): NavigationBarItem[];
getOutliningSpans(fileName: string): OutliningSpan[];
@ -1642,6 +1650,10 @@ declare module "typescript" {
containerKind: string;
containerName: string;
}
interface ReferencedSymbol {
definition: DefinitionInfo;
references: ReferenceEntry[];
}
enum SymbolDisplayPartKind {
aliasName = 0,
className = 1,

File diff suppressed because it is too large Load Diff

View File

@ -74,192 +74,195 @@ declare module ts {
BarBarToken = 49,
QuestionToken = 50,
ColonToken = 51,
EqualsToken = 52,
PlusEqualsToken = 53,
MinusEqualsToken = 54,
AsteriskEqualsToken = 55,
SlashEqualsToken = 56,
PercentEqualsToken = 57,
LessThanLessThanEqualsToken = 58,
GreaterThanGreaterThanEqualsToken = 59,
GreaterThanGreaterThanGreaterThanEqualsToken = 60,
AmpersandEqualsToken = 61,
BarEqualsToken = 62,
CaretEqualsToken = 63,
Identifier = 64,
BreakKeyword = 65,
CaseKeyword = 66,
CatchKeyword = 67,
ClassKeyword = 68,
ConstKeyword = 69,
ContinueKeyword = 70,
DebuggerKeyword = 71,
DefaultKeyword = 72,
DeleteKeyword = 73,
DoKeyword = 74,
ElseKeyword = 75,
EnumKeyword = 76,
ExportKeyword = 77,
ExtendsKeyword = 78,
FalseKeyword = 79,
FinallyKeyword = 80,
ForKeyword = 81,
FunctionKeyword = 82,
IfKeyword = 83,
ImportKeyword = 84,
InKeyword = 85,
InstanceOfKeyword = 86,
NewKeyword = 87,
NullKeyword = 88,
ReturnKeyword = 89,
SuperKeyword = 90,
SwitchKeyword = 91,
ThisKeyword = 92,
ThrowKeyword = 93,
TrueKeyword = 94,
TryKeyword = 95,
TypeOfKeyword = 96,
VarKeyword = 97,
VoidKeyword = 98,
WhileKeyword = 99,
WithKeyword = 100,
AsKeyword = 101,
ImplementsKeyword = 102,
InterfaceKeyword = 103,
LetKeyword = 104,
PackageKeyword = 105,
PrivateKeyword = 106,
ProtectedKeyword = 107,
PublicKeyword = 108,
StaticKeyword = 109,
YieldKeyword = 110,
AnyKeyword = 111,
BooleanKeyword = 112,
ConstructorKeyword = 113,
DeclareKeyword = 114,
GetKeyword = 115,
ModuleKeyword = 116,
RequireKeyword = 117,
NumberKeyword = 118,
SetKeyword = 119,
StringKeyword = 120,
SymbolKeyword = 121,
TypeKeyword = 122,
FromKeyword = 123,
OfKeyword = 124,
QualifiedName = 125,
ComputedPropertyName = 126,
TypeParameter = 127,
Parameter = 128,
PropertySignature = 129,
PropertyDeclaration = 130,
MethodSignature = 131,
MethodDeclaration = 132,
Constructor = 133,
GetAccessor = 134,
SetAccessor = 135,
CallSignature = 136,
ConstructSignature = 137,
IndexSignature = 138,
TypeReference = 139,
FunctionType = 140,
ConstructorType = 141,
TypeQuery = 142,
TypeLiteral = 143,
ArrayType = 144,
TupleType = 145,
UnionType = 146,
ParenthesizedType = 147,
ObjectBindingPattern = 148,
ArrayBindingPattern = 149,
BindingElement = 150,
ArrayLiteralExpression = 151,
ObjectLiteralExpression = 152,
PropertyAccessExpression = 153,
ElementAccessExpression = 154,
CallExpression = 155,
NewExpression = 156,
TaggedTemplateExpression = 157,
TypeAssertionExpression = 158,
ParenthesizedExpression = 159,
FunctionExpression = 160,
ArrowFunction = 161,
DeleteExpression = 162,
TypeOfExpression = 163,
VoidExpression = 164,
PrefixUnaryExpression = 165,
PostfixUnaryExpression = 166,
BinaryExpression = 167,
ConditionalExpression = 168,
TemplateExpression = 169,
YieldExpression = 170,
SpreadElementExpression = 171,
OmittedExpression = 172,
TemplateSpan = 173,
Block = 174,
VariableStatement = 175,
EmptyStatement = 176,
ExpressionStatement = 177,
IfStatement = 178,
DoStatement = 179,
WhileStatement = 180,
ForStatement = 181,
ForInStatement = 182,
ForOfStatement = 183,
ContinueStatement = 184,
BreakStatement = 185,
ReturnStatement = 186,
WithStatement = 187,
SwitchStatement = 188,
LabeledStatement = 189,
ThrowStatement = 190,
TryStatement = 191,
DebuggerStatement = 192,
VariableDeclaration = 193,
VariableDeclarationList = 194,
FunctionDeclaration = 195,
ClassDeclaration = 196,
InterfaceDeclaration = 197,
TypeAliasDeclaration = 198,
EnumDeclaration = 199,
ModuleDeclaration = 200,
ModuleBlock = 201,
CaseBlock = 202,
ImportEqualsDeclaration = 203,
ImportDeclaration = 204,
ImportClause = 205,
NamespaceImport = 206,
NamedImports = 207,
ImportSpecifier = 208,
ExportAssignment = 209,
ExportDeclaration = 210,
NamedExports = 211,
ExportSpecifier = 212,
ExternalModuleReference = 213,
CaseClause = 214,
DefaultClause = 215,
HeritageClause = 216,
CatchClause = 217,
PropertyAssignment = 218,
ShorthandPropertyAssignment = 219,
EnumMember = 220,
SourceFile = 221,
SyntaxList = 222,
Count = 223,
FirstAssignment = 52,
LastAssignment = 63,
FirstReservedWord = 65,
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 124,
FirstFutureReservedWord = 102,
LastFutureReservedWord = 110,
FirstTypeNode = 139,
LastTypeNode = 147,
AtToken = 52,
EqualsToken = 53,
PlusEqualsToken = 54,
MinusEqualsToken = 55,
AsteriskEqualsToken = 56,
SlashEqualsToken = 57,
PercentEqualsToken = 58,
LessThanLessThanEqualsToken = 59,
GreaterThanGreaterThanEqualsToken = 60,
GreaterThanGreaterThanGreaterThanEqualsToken = 61,
AmpersandEqualsToken = 62,
BarEqualsToken = 63,
CaretEqualsToken = 64,
Identifier = 65,
BreakKeyword = 66,
CaseKeyword = 67,
CatchKeyword = 68,
ClassKeyword = 69,
ConstKeyword = 70,
ContinueKeyword = 71,
DebuggerKeyword = 72,
DefaultKeyword = 73,
DeleteKeyword = 74,
DoKeyword = 75,
ElseKeyword = 76,
EnumKeyword = 77,
ExportKeyword = 78,
ExtendsKeyword = 79,
FalseKeyword = 80,
FinallyKeyword = 81,
ForKeyword = 82,
FunctionKeyword = 83,
IfKeyword = 84,
ImportKeyword = 85,
InKeyword = 86,
InstanceOfKeyword = 87,
NewKeyword = 88,
NullKeyword = 89,
ReturnKeyword = 90,
SuperKeyword = 91,
SwitchKeyword = 92,
ThisKeyword = 93,
ThrowKeyword = 94,
TrueKeyword = 95,
TryKeyword = 96,
TypeOfKeyword = 97,
VarKeyword = 98,
VoidKeyword = 99,
WhileKeyword = 100,
WithKeyword = 101,
AsKeyword = 102,
ImplementsKeyword = 103,
InterfaceKeyword = 104,
LetKeyword = 105,
PackageKeyword = 106,
PrivateKeyword = 107,
ProtectedKeyword = 108,
PublicKeyword = 109,
StaticKeyword = 110,
YieldKeyword = 111,
AnyKeyword = 112,
BooleanKeyword = 113,
ConstructorKeyword = 114,
DeclareKeyword = 115,
GetKeyword = 116,
ModuleKeyword = 117,
RequireKeyword = 118,
NumberKeyword = 119,
SetKeyword = 120,
StringKeyword = 121,
SymbolKeyword = 122,
TypeKeyword = 123,
FromKeyword = 124,
OfKeyword = 125,
QualifiedName = 126,
ComputedPropertyName = 127,
TypeParameter = 128,
Parameter = 129,
Decorator = 130,
PropertySignature = 131,
PropertyDeclaration = 132,
MethodSignature = 133,
MethodDeclaration = 134,
Constructor = 135,
GetAccessor = 136,
SetAccessor = 137,
CallSignature = 138,
ConstructSignature = 139,
IndexSignature = 140,
TypeReference = 141,
FunctionType = 142,
ConstructorType = 143,
TypeQuery = 144,
TypeLiteral = 145,
ArrayType = 146,
TupleType = 147,
UnionType = 148,
ParenthesizedType = 149,
ObjectBindingPattern = 150,
ArrayBindingPattern = 151,
BindingElement = 152,
ArrayLiteralExpression = 153,
ObjectLiteralExpression = 154,
PropertyAccessExpression = 155,
ElementAccessExpression = 156,
CallExpression = 157,
NewExpression = 158,
TaggedTemplateExpression = 159,
TypeAssertionExpression = 160,
ParenthesizedExpression = 161,
FunctionExpression = 162,
ArrowFunction = 163,
DeleteExpression = 164,
TypeOfExpression = 165,
VoidExpression = 166,
PrefixUnaryExpression = 167,
PostfixUnaryExpression = 168,
BinaryExpression = 169,
ConditionalExpression = 170,
TemplateExpression = 171,
YieldExpression = 172,
SpreadElementExpression = 173,
OmittedExpression = 174,
TemplateSpan = 175,
Block = 176,
VariableStatement = 177,
EmptyStatement = 178,
ExpressionStatement = 179,
IfStatement = 180,
DoStatement = 181,
WhileStatement = 182,
ForStatement = 183,
ForInStatement = 184,
ForOfStatement = 185,
ContinueStatement = 186,
BreakStatement = 187,
ReturnStatement = 188,
WithStatement = 189,
SwitchStatement = 190,
LabeledStatement = 191,
ThrowStatement = 192,
TryStatement = 193,
DebuggerStatement = 194,
VariableDeclaration = 195,
VariableDeclarationList = 196,
FunctionDeclaration = 197,
ClassDeclaration = 198,
InterfaceDeclaration = 199,
TypeAliasDeclaration = 200,
EnumDeclaration = 201,
ModuleDeclaration = 202,
ModuleBlock = 203,
CaseBlock = 204,
ImportEqualsDeclaration = 205,
ImportDeclaration = 206,
ImportClause = 207,
NamespaceImport = 208,
NamedImports = 209,
ImportSpecifier = 210,
ExportAssignment = 211,
ExportDeclaration = 212,
NamedExports = 213,
ExportSpecifier = 214,
MissingDeclaration = 215,
ExternalModuleReference = 216,
CaseClause = 217,
DefaultClause = 218,
HeritageClause = 219,
CatchClause = 220,
PropertyAssignment = 221,
ShorthandPropertyAssignment = 222,
EnumMember = 223,
SourceFile = 224,
SyntaxList = 225,
Count = 226,
FirstAssignment = 53,
LastAssignment = 64,
FirstReservedWord = 66,
LastReservedWord = 101,
FirstKeyword = 66,
LastKeyword = 125,
FirstFutureReservedWord = 103,
LastFutureReservedWord = 111,
FirstTypeNode = 141,
LastTypeNode = 149,
FirstPunctuation = 14,
LastPunctuation = 63,
LastPunctuation = 64,
FirstToken = 0,
LastToken = 124,
LastToken = 125,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
@ -267,8 +270,8 @@ declare module ts {
FirstTemplateToken = 10,
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 63,
FirstNode = 125,
LastBinaryOperator = 64,
FirstNode = 126,
}
const enum NodeFlags {
Export = 1,
@ -284,6 +287,7 @@ declare module ts {
Let = 4096,
Const = 8192,
OctalLiteral = 16384,
ExportContext = 32768,
Modifier = 499,
AccessibilityModifier = 112,
BlockScoped = 12288,
@ -293,10 +297,11 @@ declare module ts {
DisallowIn = 2,
Yield = 4,
GeneratorParameter = 8,
ThisNodeHasError = 16,
ParserGeneratedFlags = 31,
ThisNodeOrAnySubNodesHasError = 32,
HasAggregatedChildData = 64,
Decorator = 16,
ThisNodeHasError = 32,
ParserGeneratedFlags = 63,
ThisNodeOrAnySubNodesHasError = 64,
HasAggregatedChildData = 128,
}
const enum RelationComparisonResult {
Succeeded = 1,
@ -307,6 +312,7 @@ declare module ts {
kind: SyntaxKind;
flags: NodeFlags;
parserContextFlags?: ParserContextFlags;
decorators?: NodeArray<Decorator>;
modifiers?: ModifiersArray;
id?: number;
parent?: Node;
@ -337,6 +343,9 @@ declare module ts {
interface ComputedPropertyName extends Node {
expression: Expression;
}
interface Decorator extends Node {
expression: LeftHandSideExpression;
}
interface TypeParameterDeclaration extends Declaration {
name: Identifier;
constraint?: TypeNode;
@ -516,6 +525,9 @@ declare module ts {
name?: Identifier;
body: Block | Expression;
}
interface ArrowFunction extends Expression, FunctionLikeDeclaration {
equalsGreaterThanToken: Node;
}
interface LiteralExpression extends PrimaryExpression {
text: string;
isUnterminated?: boolean;
@ -725,7 +737,8 @@ declare module ts {
type ExportSpecifier = ImportOrExportSpecifier;
interface ExportAssignment extends Declaration, ModuleElement {
isExportEquals?: boolean;
expression: Expression;
expression?: Expression;
type?: TypeNode;
}
interface FileReference extends TextRange {
fileName: string;
@ -760,14 +773,14 @@ declare module ts {
interface Program extends ScriptReferenceHost {
getSourceFiles(): SourceFile[];
/**
* Emits the javascript and declaration files. If targetSourceFile is not specified, then
* the javascript and declaration files will be produced for all the files in this program.
* If targetSourceFile is specified, then only the javascript and declaration for that
* Emits the JavaScript and declaration files. If targetSourceFile is not specified, then
* the JavaScript and declaration files will be produced for all the files in this program.
* If targetSourceFile is specified, then only the JavaScript and declaration for that
* specific file will be generated.
*
* If writeFile is not specified then the writeFile callback from the compiler host will be
* used for writing the javascript and declaration files. Otherwise, the writeFile parameter
* will be invoked when writing the javascript and declaration files.
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
* will be invoked when writing the JavaScript and declaration files.
*/
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult;
getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[];
@ -886,9 +899,10 @@ declare module ts {
NotAccessible = 1,
CannotBeNamed = 2,
}
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
interface SymbolVisibilityResult {
accessibility: SymbolAccessibility;
aliasesToMakeVisible?: ImportEqualsDeclaration[];
aliasesToMakeVisible?: AnyImportSyntax[];
errorSymbolName?: string;
errorNode?: Node;
}
@ -896,20 +910,22 @@ declare module ts {
errorModuleName?: string;
}
interface EmitResolver {
getGeneratedNameForNode(node: Node): string;
getExpressionNameSubstitution(node: Identifier): string;
hasExportDefaultValue(node: SourceFile): boolean;
isReferencedAliasDeclaration(node: Node): boolean;
hasGlobalName(name: string): boolean;
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
isValueAliasDeclaration(node: Node): boolean;
isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean;
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
getNodeCheckFlags(node: Node): NodeCheckFlags;
isDeclarationVisible(node: Declaration): boolean;
collectLinkedAliases(node: Identifier): Node[];
isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
writeTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isUnknownIdentifier(location: Node, name: string): boolean;
resolvesToSomeValue(location: Node, name: string): boolean;
getBlockScopedVariableId(node: Identifier): number;
}
const enum SymbolFlags {
@ -1016,6 +1032,7 @@ declare module ts {
ContextChecked = 64,
EnumValuesComputed = 128,
BlockScopedBindingInLoop = 256,
EmitDecorate = 512,
}
interface NodeLinks {
resolvedType?: Type;
@ -1135,17 +1152,6 @@ declare module ts {
interface TypeMapper {
(t: Type): Type;
}
interface TypeInferences {
primary: Type[];
secondary: Type[];
}
interface InferenceContext {
typeParameters: TypeParameter[];
inferUnionTypes: boolean;
inferences: TypeInferences[];
inferredTypes: Type[];
failedTypeParameterIndex?: number;
}
interface DiagnosticMessage {
key: string;
category: DiagnosticCategory;
@ -1442,7 +1448,8 @@ declare module ts {
declare module ts {
/** The version of the TypeScript compiler release */
let version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function findConfigFile(searchPath: string): string;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
@ -1556,6 +1563,7 @@ declare module ts {
getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[];
getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[];
getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[];
findReferences(fileName: string, position: number): ReferencedSymbol[];
getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[];
getNavigationBarItems(fileName: string): NavigationBarItem[];
getOutliningSpans(fileName: string): OutliningSpan[];
@ -1642,6 +1650,10 @@ declare module ts {
containerKind: string;
containerName: string;
}
interface ReferencedSymbol {
definition: DefinitionInfo;
references: ReferenceEntry[];
}
enum SymbolDisplayPartKind {
aliasName = 0,
className = 1,

File diff suppressed because it is too large Load Diff

View File

@ -41,6 +41,10 @@ declare module ts {
*/
function lastOrUndefined<T>(array: T[]): T;
function binarySearch(array: number[], value: number): number;
function reduceLeft<T>(array: T[], f: (a: T, x: T) => T): T;
function reduceLeft<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
function reduceRight<T>(array: T[], f: (a: T, x: T) => T): T;
function reduceRight<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
function hasProperty<T>(map: Map<T>, key: string): boolean;
function getProperty<T>(map: Map<T>, key: string): T;
function isEmpty<T>(map: Map<T>): boolean;
@ -49,7 +53,6 @@ declare module ts {
function forEachValue<T, U>(map: Map<T>, callback: (value: T) => U): U;
function forEachKey<T, U>(map: Map<T>, callback: (key: string) => U): U;
function lookUp<T>(map: Map<T>, key: string): T;
function mapToArray<T>(map: Map<T>): T[];
function copyMap<T>(source: Map<T>, target: Map<T>): void;
/**
* Creates a map from the elements of an array.
@ -184,7 +187,7 @@ declare module ts {
function isConst(node: Node): boolean;
function isLet(node: Node): boolean;
function isPrologueDirective(node: Node): boolean;
function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile): CommentRange[];
function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
function getJsDocComments(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
let fullTripleSlashReferencePathRegEx: RegExp;
function forEachReturnStatement<T>(body: Block, visitor: (stmt: ReturnStatement) => T): T;
@ -195,6 +198,10 @@ declare module ts {
function getThisContainer(node: Node, includeArrowFunctions: boolean): Node;
function getSuperContainer(node: Node, includeFunctions: boolean): Node;
function getInvokedExpression(node: CallLikeExpression): Expression;
function nodeCanBeDecorated(node: Node): boolean;
function nodeIsDecorated(node: Node): boolean;
function childIsDecorated(node: Node): boolean;
function nodeOrChildIsDecorated(node: Node): boolean;
function isExpression(node: Node): boolean;
function isInstantiatedModule(node: ModuleDeclaration, preserveConstEnums: boolean): boolean;
function isExternalModuleImportEqualsDeclaration(node: Node): boolean;
@ -211,7 +218,9 @@ declare module ts {
function isInAmbientContext(node: Node): boolean;
function isDeclaration(node: Node): boolean;
function isStatement(n: Node): boolean;
function isClassElement(n: Node): boolean;
function isDeclarationName(name: Node): boolean;
function isAliasSymbolDeclaration(node: Node): boolean;
function getClassBaseTypeNode(node: ClassDeclaration): TypeReferenceNode;
function getClassImplementedTypeNodes(node: ClassDeclaration): NodeArray<TypeReferenceNode>;
function getInterfaceBaseTypeNodes(node: InterfaceDeclaration): NodeArray<TypeReferenceNode>;
@ -270,7 +279,6 @@ declare module ts {
function nodeStartsNewLexicalEnvironment(n: Node): boolean;
function nodeIsSynthesized(node: Node): boolean;
function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node;
function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string;
/**
* Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2),
* but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine)
@ -278,6 +286,38 @@ declare module ts {
*/
function escapeString(s: string): string;
function escapeNonAsciiCharacters(s: string): string;
interface EmitTextWriter {
write(s: string): void;
writeTextOfNode(sourceFile: SourceFile, node: Node): void;
writeLine(): void;
increaseIndent(): void;
decreaseIndent(): void;
getText(): string;
rawWrite(s: string): void;
writeLiteral(s: string): void;
getTextPos(): number;
getLine(): number;
getColumn(): number;
getIndent(): number;
}
function getIndentString(level: number): string;
function getIndentSize(): number;
function createTextWriter(newLine: String): EmitTextWriter;
function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string): string;
function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string): string;
function writeFile(host: EmitHost, diagnostics: Diagnostic[], fileName: string, data: string, writeByteOrderMark: boolean): void;
function getLineOfLocalPosition(currentSourceFile: SourceFile, pos: number): number;
function getFirstConstructorWithBody(node: ClassDeclaration): ConstructorDeclaration;
function shouldEmitToOwnFile(sourceFile: SourceFile, compilerOptions: CompilerOptions): boolean;
function getAllAccessorDeclarations(declarations: NodeArray<Declaration>, accessor: AccessorDeclaration): {
firstAccessor: AccessorDeclaration;
secondAccessor: AccessorDeclaration;
getAccessor: AccessorDeclaration;
setAccessor: AccessorDeclaration;
};
function emitNewLineBeforeLeadingComments(currentSourceFile: SourceFile, writer: EmitTextWriter, node: TextRange, leadingComments: CommentRange[]): void;
function emitComments(currentSourceFile: SourceFile, writer: EmitTextWriter, comments: CommentRange[], trailingSeparator: boolean, newLine: string, writeComment: (currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string) => void): void;
function writeCommentRange(currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string): void;
}
declare module ts {
var optionDeclarations: CommandLineOption[];
@ -297,7 +337,10 @@ declare module ts {
function rangeContainsStartEnd(range: TextRange, start: number, end: number): boolean;
function rangeOverlapsWithStartEnd(r1: TextRange, start: number, end: number): boolean;
function startEndOverlapsWithStartEnd(start1: number, end1: number, start2: number, end2: number): boolean;
function positionBelongsToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean;
function isCompletedNode(n: Node, sourceFile: SourceFile): boolean;
function findListItemInfo(node: Node): ListItemInfo;
function hasChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): boolean;
function findChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): Node;
function findContainingList(node: Node): Node;
function getTouchingWord(sourceFile: SourceFile, position: number): Node;
@ -320,9 +363,11 @@ declare module ts {
function getNodeModifiers(node: Node): string;
function getTypeArgumentOrTypeParameterList(node: Node): NodeArray<Node>;
function isToken(n: Node): boolean;
function isWord(kind: SyntaxKind): boolean;
function isComment(kind: SyntaxKind): boolean;
function isPunctuation(kind: SyntaxKind): boolean;
function isInsideTemplateLiteral(node: LiteralExpression, position: number): boolean;
function isAccessibilityModifier(kind: SyntaxKind): boolean;
function compareDataObjects(dst: any, src: any): boolean;
}
declare module ts {
@ -333,6 +378,7 @@ declare module ts {
function keywordPart(kind: SyntaxKind): SymbolDisplayPart;
function punctuationPart(kind: SyntaxKind): SymbolDisplayPart;
function operatorPart(kind: SyntaxKind): SymbolDisplayPart;
function textOrKeywordPart(text: string): SymbolDisplayPart;
function textPart(text: string): SymbolDisplayPart;
function lineBreakPart(): SymbolDisplayPart;
function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[];

View File

@ -41,6 +41,10 @@ declare module "typescript" {
*/
function lastOrUndefined<T>(array: T[]): T;
function binarySearch(array: number[], value: number): number;
function reduceLeft<T>(array: T[], f: (a: T, x: T) => T): T;
function reduceLeft<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
function reduceRight<T>(array: T[], f: (a: T, x: T) => T): T;
function reduceRight<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
function hasProperty<T>(map: Map<T>, key: string): boolean;
function getProperty<T>(map: Map<T>, key: string): T;
function isEmpty<T>(map: Map<T>): boolean;
@ -49,7 +53,6 @@ declare module "typescript" {
function forEachValue<T, U>(map: Map<T>, callback: (value: T) => U): U;
function forEachKey<T, U>(map: Map<T>, callback: (key: string) => U): U;
function lookUp<T>(map: Map<T>, key: string): T;
function mapToArray<T>(map: Map<T>): T[];
function copyMap<T>(source: Map<T>, target: Map<T>): void;
/**
* Creates a map from the elements of an array.
@ -184,7 +187,7 @@ declare module "typescript" {
function isConst(node: Node): boolean;
function isLet(node: Node): boolean;
function isPrologueDirective(node: Node): boolean;
function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile): CommentRange[];
function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
function getJsDocComments(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
let fullTripleSlashReferencePathRegEx: RegExp;
function forEachReturnStatement<T>(body: Block, visitor: (stmt: ReturnStatement) => T): T;
@ -195,6 +198,10 @@ declare module "typescript" {
function getThisContainer(node: Node, includeArrowFunctions: boolean): Node;
function getSuperContainer(node: Node, includeFunctions: boolean): Node;
function getInvokedExpression(node: CallLikeExpression): Expression;
function nodeCanBeDecorated(node: Node): boolean;
function nodeIsDecorated(node: Node): boolean;
function childIsDecorated(node: Node): boolean;
function nodeOrChildIsDecorated(node: Node): boolean;
function isExpression(node: Node): boolean;
function isInstantiatedModule(node: ModuleDeclaration, preserveConstEnums: boolean): boolean;
function isExternalModuleImportEqualsDeclaration(node: Node): boolean;
@ -211,7 +218,9 @@ declare module "typescript" {
function isInAmbientContext(node: Node): boolean;
function isDeclaration(node: Node): boolean;
function isStatement(n: Node): boolean;
function isClassElement(n: Node): boolean;
function isDeclarationName(name: Node): boolean;
function isAliasSymbolDeclaration(node: Node): boolean;
function getClassBaseTypeNode(node: ClassDeclaration): TypeReferenceNode;
function getClassImplementedTypeNodes(node: ClassDeclaration): NodeArray<TypeReferenceNode>;
function getInterfaceBaseTypeNodes(node: InterfaceDeclaration): NodeArray<TypeReferenceNode>;
@ -270,7 +279,6 @@ declare module "typescript" {
function nodeStartsNewLexicalEnvironment(n: Node): boolean;
function nodeIsSynthesized(node: Node): boolean;
function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node;
function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string;
/**
* Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2),
* but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine)
@ -278,6 +286,38 @@ declare module "typescript" {
*/
function escapeString(s: string): string;
function escapeNonAsciiCharacters(s: string): string;
interface EmitTextWriter {
write(s: string): void;
writeTextOfNode(sourceFile: SourceFile, node: Node): void;
writeLine(): void;
increaseIndent(): void;
decreaseIndent(): void;
getText(): string;
rawWrite(s: string): void;
writeLiteral(s: string): void;
getTextPos(): number;
getLine(): number;
getColumn(): number;
getIndent(): number;
}
function getIndentString(level: number): string;
function getIndentSize(): number;
function createTextWriter(newLine: String): EmitTextWriter;
function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string): string;
function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string): string;
function writeFile(host: EmitHost, diagnostics: Diagnostic[], fileName: string, data: string, writeByteOrderMark: boolean): void;
function getLineOfLocalPosition(currentSourceFile: SourceFile, pos: number): number;
function getFirstConstructorWithBody(node: ClassDeclaration): ConstructorDeclaration;
function shouldEmitToOwnFile(sourceFile: SourceFile, compilerOptions: CompilerOptions): boolean;
function getAllAccessorDeclarations(declarations: NodeArray<Declaration>, accessor: AccessorDeclaration): {
firstAccessor: AccessorDeclaration;
secondAccessor: AccessorDeclaration;
getAccessor: AccessorDeclaration;
setAccessor: AccessorDeclaration;
};
function emitNewLineBeforeLeadingComments(currentSourceFile: SourceFile, writer: EmitTextWriter, node: TextRange, leadingComments: CommentRange[]): void;
function emitComments(currentSourceFile: SourceFile, writer: EmitTextWriter, comments: CommentRange[], trailingSeparator: boolean, newLine: string, writeComment: (currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string) => void): void;
function writeCommentRange(currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string): void;
}
declare module "typescript" {
var optionDeclarations: CommandLineOption[];
@ -297,7 +337,10 @@ declare module "typescript" {
function rangeContainsStartEnd(range: TextRange, start: number, end: number): boolean;
function rangeOverlapsWithStartEnd(r1: TextRange, start: number, end: number): boolean;
function startEndOverlapsWithStartEnd(start1: number, end1: number, start2: number, end2: number): boolean;
function positionBelongsToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean;
function isCompletedNode(n: Node, sourceFile: SourceFile): boolean;
function findListItemInfo(node: Node): ListItemInfo;
function hasChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): boolean;
function findChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): Node;
function findContainingList(node: Node): Node;
function getTouchingWord(sourceFile: SourceFile, position: number): Node;
@ -320,9 +363,11 @@ declare module "typescript" {
function getNodeModifiers(node: Node): string;
function getTypeArgumentOrTypeParameterList(node: Node): NodeArray<Node>;
function isToken(n: Node): boolean;
function isWord(kind: SyntaxKind): boolean;
function isComment(kind: SyntaxKind): boolean;
function isPunctuation(kind: SyntaxKind): boolean;
function isInsideTemplateLiteral(node: LiteralExpression, position: number): boolean;
function isAccessibilityModifier(kind: SyntaxKind): boolean;
function compareDataObjects(dst: any, src: any): boolean;
}
declare module "typescript" {
@ -333,6 +378,7 @@ declare module "typescript" {
function keywordPart(kind: SyntaxKind): SymbolDisplayPart;
function punctuationPart(kind: SyntaxKind): SymbolDisplayPart;
function operatorPart(kind: SyntaxKind): SymbolDisplayPart;
function textOrKeywordPart(text: string): SymbolDisplayPart;
function textPart(text: string): SymbolDisplayPart;
function lineBreakPart(): SymbolDisplayPart;
function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[];