From 7fb92f8af0bdb4f5632277677b72019c28e1e710 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 16:57:02 -0800 Subject: [PATCH] Fixed up baselines. --- .../reference/APISample_node_compile.js | 321 +++++----- .../reference/APISample_node_compile.types | 583 ++++++++++-------- .../reference/APISample_standalone_compile.js | 310 +++++----- .../APISample_standalone_compile.types | 562 ++++++++++------- 4 files changed, 1011 insertions(+), 765 deletions(-) diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js index 2329e7be57c..6807d97db84 100644 --- a/tests/baselines/reference/APISample_node_compile.js +++ b/tests/baselines/reference/APISample_node_compile.js @@ -23,7 +23,7 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -declare module ts { +declare module "typescript" { interface Map { [index: string]: T; } @@ -152,92 +152,91 @@ declare module ts { SetKeyword = 117, StringKeyword = 118, TypeKeyword = 119, - Missing = 120, - QualifiedName = 121, - ComputedPropertyName = 122, - TypeParameter = 123, - Parameter = 124, - Property = 125, - Method = 126, - Constructor = 127, - GetAccessor = 128, - SetAccessor = 129, - CallSignature = 130, - ConstructSignature = 131, - IndexSignature = 132, - TypeReference = 133, - FunctionType = 134, - ConstructorType = 135, - TypeQuery = 136, - TypeLiteral = 137, - ArrayType = 138, - TupleType = 139, - UnionType = 140, - ParenthesizedType = 141, - ArrayLiteralExpression = 142, - ObjectLiteralExpression = 143, - PropertyAccessExpression = 144, - ElementAccessExpression = 145, - CallExpression = 146, - NewExpression = 147, - TaggedTemplateExpression = 148, - TypeAssertionExpression = 149, - ParenthesizedExpression = 150, - FunctionExpression = 151, - ArrowFunction = 152, - DeleteExpression = 153, - TypeOfExpression = 154, - VoidExpression = 155, - PrefixUnaryExpression = 156, - PostfixUnaryExpression = 157, - BinaryExpression = 158, - ConditionalExpression = 159, - TemplateExpression = 160, - YieldExpression = 161, - OmittedExpression = 162, - TemplateSpan = 163, - Block = 164, - VariableStatement = 165, - EmptyStatement = 166, - ExpressionStatement = 167, - IfStatement = 168, - DoStatement = 169, - WhileStatement = 170, - ForStatement = 171, - ForInStatement = 172, - ContinueStatement = 173, - BreakStatement = 174, - ReturnStatement = 175, - WithStatement = 176, - SwitchStatement = 177, - LabeledStatement = 178, - ThrowStatement = 179, - TryStatement = 180, - TryBlock = 181, - CatchBlock = 182, - FinallyBlock = 183, - DebuggerStatement = 184, - VariableDeclaration = 185, - FunctionDeclaration = 186, - FunctionBlock = 187, - ClassDeclaration = 188, - InterfaceDeclaration = 189, - TypeAliasDeclaration = 190, - EnumDeclaration = 191, - ModuleDeclaration = 192, - ModuleBlock = 193, - ImportDeclaration = 194, - ExportAssignment = 195, - CaseClause = 196, - DefaultClause = 197, - HeritageClause = 198, - PropertyAssignment = 199, - ShorthandPropertyAssignment = 200, - EnumMember = 201, - SourceFile = 202, - Program = 203, - SyntaxList = 204, - Count = 205, + QualifiedName = 120, + ComputedPropertyName = 121, + TypeParameter = 122, + Parameter = 123, + Property = 124, + Method = 125, + Constructor = 126, + GetAccessor = 127, + SetAccessor = 128, + CallSignature = 129, + ConstructSignature = 130, + IndexSignature = 131, + TypeReference = 132, + FunctionType = 133, + ConstructorType = 134, + TypeQuery = 135, + TypeLiteral = 136, + ArrayType = 137, + TupleType = 138, + UnionType = 139, + ParenthesizedType = 140, + ArrayLiteralExpression = 141, + ObjectLiteralExpression = 142, + PropertyAccessExpression = 143, + ElementAccessExpression = 144, + CallExpression = 145, + NewExpression = 146, + TaggedTemplateExpression = 147, + TypeAssertionExpression = 148, + ParenthesizedExpression = 149, + FunctionExpression = 150, + ArrowFunction = 151, + DeleteExpression = 152, + TypeOfExpression = 153, + VoidExpression = 154, + PrefixUnaryExpression = 155, + PostfixUnaryExpression = 156, + BinaryExpression = 157, + ConditionalExpression = 158, + TemplateExpression = 159, + YieldExpression = 160, + OmittedExpression = 161, + TemplateSpan = 162, + Block = 163, + VariableStatement = 164, + EmptyStatement = 165, + ExpressionStatement = 166, + IfStatement = 167, + DoStatement = 168, + WhileStatement = 169, + ForStatement = 170, + ForInStatement = 171, + ContinueStatement = 172, + BreakStatement = 173, + ReturnStatement = 174, + WithStatement = 175, + SwitchStatement = 176, + LabeledStatement = 177, + ThrowStatement = 178, + TryStatement = 179, + TryBlock = 180, + FinallyBlock = 181, + DebuggerStatement = 182, + VariableDeclaration = 183, + FunctionDeclaration = 184, + ClassDeclaration = 185, + InterfaceDeclaration = 186, + TypeAliasDeclaration = 187, + EnumDeclaration = 188, + ModuleDeclaration = 189, + ModuleBlock = 190, + ImportDeclaration = 191, + ExportAssignment = 192, + ExternalModuleReference = 193, + CaseClause = 194, + DefaultClause = 195, + HeritageClause = 196, + CatchClause = 197, + PropertyAssignment = 198, + ShorthandPropertyAssignment = 199, + EnumMember = 200, + SourceFile = 201, + Program = 202, + SyntaxList = 203, + Count = 204, FirstAssignment = 51, LastAssignment = 62, FirstReservedWord = 64, @@ -246,11 +245,11 @@ declare module ts { LastKeyword = 119, FirstFutureReservedWord = 100, LastFutureReservedWord = 108, - FirstTypeNode = 133, - LastTypeNode = 141, + FirstTypeNode = 132, + LastTypeNode = 140, FirstPunctuation = 13, LastPunctuation = 62, - FirstToken = 1, + FirstToken = 0, LastToken = 119, FirstTriviaToken = 2, LastTriviaToken = 5, @@ -262,12 +261,11 @@ declare module ts { LastOperator = 62, FirstBinaryOperator = 23, LastBinaryOperator = 62, + FirstNode = 120, } const enum NodeFlags { Export = 1, Ambient = 2, - QuestionMark = 4, - Rest = 8, Public = 16, Private = 32, Protected = 64, @@ -287,6 +285,8 @@ declare module ts { DisallowIn = 2, Yield = 4, GeneratorParameter = 8, + ContainsError = 16, + HasPropagatedChildContainsErrorFlag = 32, } interface Node extends TextRange { kind: SyntaxKind; @@ -303,7 +303,7 @@ declare module ts { interface NodeArray extends Array, TextRange { hasTrailingComma?: boolean; } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { flags: number; } interface Identifier extends PrimaryExpression { @@ -314,11 +314,6 @@ declare module ts { right: Identifier; } type EntityName = Identifier | QualifiedName; - interface ParsedSignature { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; interface Declaration extends Node { _declarationBrand: any; @@ -332,21 +327,43 @@ declare module ts { constraint?: TypeNode; expression?: Expression; } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; } interface VariableDeclaration extends Declaration { name: Identifier; type?: TypeNode; initializer?: Expression; } + interface ParameterDeclaration extends Declaration { + dotDotDotToken?: Node; + name: Identifier; + questionToken?: Node; + type?: TypeNode | StringLiteralExpression; + initializer?: Expression; + } interface PropertyDeclaration extends Declaration, ClassElement { + _propertyDeclarationBrand: any; + questionToken?: Node; type?: TypeNode; initializer?: Expression; } - interface ShortHandPropertyDeclaration extends Declaration { - name: Identifier; + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; + interface ObjectLiteralElement extends Declaration { + _objectLiteralBrandBrand: any; } - interface ParameterDeclaration extends VariableDeclaration { + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface PropertyAssignment extends ObjectLiteralElement { + _propertyAssignmentBrand: any; + name: DeclarationName; + questionToken?: Node; + initializer: Expression; } /** * Several node kinds share function-like features such as a signature, @@ -359,25 +376,31 @@ declare module ts { interface FunctionLikeDeclaration extends SignatureDeclaration { _functionLikeDeclarationBrand: any; asteriskToken?: Node; + questionToken?: Node; body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { name: Identifier; body?: Block; } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { body?: Block; } interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { body?: Block; } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + _accessorDeclarationBrand: any; + body: Block; } interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { _indexSignatureDeclarationBrand: any; } interface TypeNode extends Node { + _typeNodeBrand: any; + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { + _functionOrConstructorTypeNodeBrand: any; } interface TypeReferenceNode extends TypeNode { typeName: EntityName; @@ -401,9 +424,6 @@ declare module ts { interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } - interface StringLiteralTypeNode extends TypeNode { - text: string; - } interface Expression extends Node { _expressionBrand: any; contextualType?: Type; @@ -460,6 +480,10 @@ declare module ts { } interface LiteralExpression extends PrimaryExpression { text: string; + isUnterminated?: boolean; + } + interface StringLiteralExpression extends LiteralExpression { + _stringLiteralExpressionBrand: any; } interface TemplateExpression extends PrimaryExpression { head: LiteralExpression; @@ -476,7 +500,7 @@ declare module ts { elements: NodeArray; } interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; + properties: NodeArray; } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; @@ -484,7 +508,7 @@ declare module ts { } interface ElementAccessExpression extends MemberExpression { expression: LeftHandSideExpression; - argumentExpression: Expression; + argumentExpression?: Expression; } interface CallExpression extends LeftHandSideExpression { expression: LeftHandSideExpression; @@ -553,10 +577,14 @@ declare module ts { expression: Expression; clauses: NodeArray; } - interface CaseOrDefaultClause extends Node { + interface CaseClause extends Node { expression?: Expression; statements: NodeArray; } + interface DefaultClause extends Node { + statements: NodeArray; + } + type CaseOrDefaultClause = CaseClause | DefaultClause; interface LabeledStatement extends Statement { label: Identifier; statement: Statement; @@ -566,12 +594,13 @@ declare module ts { } interface TryStatement extends Statement { tryBlock: Block; - catchBlock?: CatchBlock; + catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchBlock extends Block, Declaration { - variable: Identifier; + interface CatchClause extends Declaration { + name: Identifier; type?: TypeNode; + block: Block; } interface ModuleElement extends Node { _moduleElementBrand: any; @@ -616,8 +645,10 @@ declare module ts { } interface ImportDeclaration extends Declaration, ModuleElement { name: Identifier; - entityName?: EntityName; - externalModuleName?: LiteralExpression; + moduleReference: EntityName | ExternalModuleReference; + } + interface ExternalModuleReference extends Node { + expression?: Expression; } interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; @@ -630,6 +661,7 @@ declare module ts { } interface SourceFile extends Declaration { statements: NodeArray; + endOfFileToken: Node; filename: string; text: string; getLineAndCharacterFromPosition(position: number): LineAndCharacter; @@ -638,10 +670,11 @@ declare module ts { amdDependencies: string[]; amdModuleName: string; referencedFiles: FileReference[]; - semanticDiagnostics: Diagnostic[]; + referenceDiagnostics: Diagnostic[]; parseDiagnostics: Diagnostic[]; grammarDiagnostics: Diagnostic[]; getSyntacticDiagnostics(): Diagnostic[]; + semanticDiagnostics: Diagnostic[]; hasNoDefaultLib: boolean; externalModuleIndicator: Node; nodeCount: number; @@ -703,10 +736,8 @@ declare module ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; - checkProgram(): void; emitFiles(targetSourceFile?: SourceFile): EmitResult; - getParentOfSymbol(symbol: Symbol): Symbol; - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type; getPropertiesOfType(type: Type): Symbol[]; getPropertyOfType(type: Type, propertyName: string): Symbol; @@ -714,16 +745,16 @@ declare module ts { getIndexTypeOfType(type: Type, kind: IndexKind): Type; getReturnTypeOfSignature(signature: Signature): Type; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolInfo(node: Node): Symbol; + getSymbolAtLocation(node: Node): Symbol; getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeOfNode(node: Node): Type; + getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; getSymbolDisplayBuilder(): SymbolDisplayBuilder; getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Node): Type; + getContextualType(node: Expression): Type; getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; @@ -797,10 +828,10 @@ declare module ts { isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(): boolean; + hasSemanticErrors(sourceFile?: SourceFile): boolean; isDeclarationVisible(node: Declaration): boolean; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; @@ -944,7 +975,6 @@ declare module ts { StringLike = 258, NumberLike = 132, ObjectType = 48128, - Structured = 65025, } interface Type { flags: TypeFlags; @@ -1057,12 +1087,6 @@ declare module ts { * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit */ isEarly?: boolean; - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; } enum DiagnosticCategory { Warning = 0, @@ -1094,6 +1118,7 @@ declare module ts { version?: boolean; watch?: boolean; preserveConstEnums?: boolean; + allowNonTsExtensions?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1254,7 +1279,7 @@ declare module ts { } interface CompilerHost { getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; getCancellationToken?(): CancellationToken; writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; getCurrentDirectory(): string; @@ -1263,7 +1288,7 @@ declare module ts { getNewLine(): string; } } -declare module ts { +declare module "typescript" { interface ErrorCallback { (message: DiagnosticMessage): void; } @@ -1280,12 +1305,14 @@ declare module ts { hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; isReservedWord(): boolean; + isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; reScanTemplateToken(): SyntaxKind; scan(): SyntaxKind; setText(text: string): void; setTextPos(textPos: number): void; + lookAhead(callback: () => T): T; tryScan(callback: () => T): T; } function tokenToString(t: SyntaxKind): string; @@ -1307,23 +1334,19 @@ declare module ts { function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; } -declare module ts { - interface ReferencePathMatchResult { - fileReference?: FileReference; - diagnostic?: DiagnosticMessage; - isNoDefaultLib?: boolean; - } +declare module "typescript" { function getNodeConstructor(kind: SyntaxKind): new () => Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; } -declare module ts { +declare module "typescript" { function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; } -declare module ts { +declare module "typescript" { + var servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1411,10 +1434,10 @@ declare module ts { getScriptVersion(fileName: string): string; getScriptIsOpen(fileName: string): boolean; getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages(): any; - getCancellationToken(): CancellationToken; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; getCurrentDirectory(): string; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; } interface LanguageService { cleanupSemanticCache(): void; @@ -1423,7 +1446,7 @@ declare module ts { getCompilerOptionsDiagnostics(): Diagnostic[]; getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; @@ -1811,11 +1834,12 @@ declare module ts { static interfaceName: string; static moduleName: string; static typeParameterName: string; + static typeAlias: string; } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; function getDefaultCompilerOptions(): CompilerOptions; class OperationCanceledException { } @@ -1832,7 +1856,6 @@ declare module ts { function createClassifier(host: Logger): Classifier; } -export = ts; //// [APISample_node_compile.js] var ts = require("typescript"); diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types index 15aa4b13a2e..4331fb28c72 100644 --- a/tests/baselines/reference/APISample_node_compile.types +++ b/tests/baselines/reference/APISample_node_compile.types @@ -41,9 +41,7 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -declare module ts { ->ts : typeof ts - +declare module "typescript" { interface Map { >Map : Map >T : T @@ -424,262 +422,259 @@ declare module ts { TypeKeyword = 119, >TypeKeyword : SyntaxKind - Missing = 120, ->Missing : SyntaxKind - - QualifiedName = 121, + QualifiedName = 120, >QualifiedName : SyntaxKind - ComputedPropertyName = 122, + ComputedPropertyName = 121, >ComputedPropertyName : SyntaxKind - TypeParameter = 123, + TypeParameter = 122, >TypeParameter : SyntaxKind - Parameter = 124, + Parameter = 123, >Parameter : SyntaxKind - Property = 125, + Property = 124, >Property : SyntaxKind - Method = 126, + Method = 125, >Method : SyntaxKind - Constructor = 127, + Constructor = 126, >Constructor : SyntaxKind - GetAccessor = 128, + GetAccessor = 127, >GetAccessor : SyntaxKind - SetAccessor = 129, + SetAccessor = 128, >SetAccessor : SyntaxKind - CallSignature = 130, + CallSignature = 129, >CallSignature : SyntaxKind - ConstructSignature = 131, + ConstructSignature = 130, >ConstructSignature : SyntaxKind - IndexSignature = 132, + IndexSignature = 131, >IndexSignature : SyntaxKind - TypeReference = 133, + TypeReference = 132, >TypeReference : SyntaxKind - FunctionType = 134, + FunctionType = 133, >FunctionType : SyntaxKind - ConstructorType = 135, + ConstructorType = 134, >ConstructorType : SyntaxKind - TypeQuery = 136, + TypeQuery = 135, >TypeQuery : SyntaxKind - TypeLiteral = 137, + TypeLiteral = 136, >TypeLiteral : SyntaxKind - ArrayType = 138, + ArrayType = 137, >ArrayType : SyntaxKind - TupleType = 139, + TupleType = 138, >TupleType : SyntaxKind - UnionType = 140, + UnionType = 139, >UnionType : SyntaxKind - ParenthesizedType = 141, + ParenthesizedType = 140, >ParenthesizedType : SyntaxKind - ArrayLiteralExpression = 142, + ArrayLiteralExpression = 141, >ArrayLiteralExpression : SyntaxKind - ObjectLiteralExpression = 143, + ObjectLiteralExpression = 142, >ObjectLiteralExpression : SyntaxKind - PropertyAccessExpression = 144, + PropertyAccessExpression = 143, >PropertyAccessExpression : SyntaxKind - ElementAccessExpression = 145, + ElementAccessExpression = 144, >ElementAccessExpression : SyntaxKind - CallExpression = 146, + CallExpression = 145, >CallExpression : SyntaxKind - NewExpression = 147, + NewExpression = 146, >NewExpression : SyntaxKind - TaggedTemplateExpression = 148, + TaggedTemplateExpression = 147, >TaggedTemplateExpression : SyntaxKind - TypeAssertionExpression = 149, + TypeAssertionExpression = 148, >TypeAssertionExpression : SyntaxKind - ParenthesizedExpression = 150, + ParenthesizedExpression = 149, >ParenthesizedExpression : SyntaxKind - FunctionExpression = 151, + FunctionExpression = 150, >FunctionExpression : SyntaxKind - ArrowFunction = 152, + ArrowFunction = 151, >ArrowFunction : SyntaxKind - DeleteExpression = 153, + DeleteExpression = 152, >DeleteExpression : SyntaxKind - TypeOfExpression = 154, + TypeOfExpression = 153, >TypeOfExpression : SyntaxKind - VoidExpression = 155, + VoidExpression = 154, >VoidExpression : SyntaxKind - PrefixUnaryExpression = 156, + PrefixUnaryExpression = 155, >PrefixUnaryExpression : SyntaxKind - PostfixUnaryExpression = 157, + PostfixUnaryExpression = 156, >PostfixUnaryExpression : SyntaxKind - BinaryExpression = 158, + BinaryExpression = 157, >BinaryExpression : SyntaxKind - ConditionalExpression = 159, + ConditionalExpression = 158, >ConditionalExpression : SyntaxKind - TemplateExpression = 160, + TemplateExpression = 159, >TemplateExpression : SyntaxKind - YieldExpression = 161, + YieldExpression = 160, >YieldExpression : SyntaxKind - OmittedExpression = 162, + OmittedExpression = 161, >OmittedExpression : SyntaxKind - TemplateSpan = 163, + TemplateSpan = 162, >TemplateSpan : SyntaxKind - Block = 164, + Block = 163, >Block : SyntaxKind - VariableStatement = 165, + VariableStatement = 164, >VariableStatement : SyntaxKind - EmptyStatement = 166, + EmptyStatement = 165, >EmptyStatement : SyntaxKind - ExpressionStatement = 167, + ExpressionStatement = 166, >ExpressionStatement : SyntaxKind - IfStatement = 168, + IfStatement = 167, >IfStatement : SyntaxKind - DoStatement = 169, + DoStatement = 168, >DoStatement : SyntaxKind - WhileStatement = 170, + WhileStatement = 169, >WhileStatement : SyntaxKind - ForStatement = 171, + ForStatement = 170, >ForStatement : SyntaxKind - ForInStatement = 172, + ForInStatement = 171, >ForInStatement : SyntaxKind - ContinueStatement = 173, + ContinueStatement = 172, >ContinueStatement : SyntaxKind - BreakStatement = 174, + BreakStatement = 173, >BreakStatement : SyntaxKind - ReturnStatement = 175, + ReturnStatement = 174, >ReturnStatement : SyntaxKind - WithStatement = 176, + WithStatement = 175, >WithStatement : SyntaxKind - SwitchStatement = 177, + SwitchStatement = 176, >SwitchStatement : SyntaxKind - LabeledStatement = 178, + LabeledStatement = 177, >LabeledStatement : SyntaxKind - ThrowStatement = 179, + ThrowStatement = 178, >ThrowStatement : SyntaxKind - TryStatement = 180, + TryStatement = 179, >TryStatement : SyntaxKind - TryBlock = 181, + TryBlock = 180, >TryBlock : SyntaxKind - CatchBlock = 182, ->CatchBlock : SyntaxKind - - FinallyBlock = 183, + FinallyBlock = 181, >FinallyBlock : SyntaxKind - DebuggerStatement = 184, + DebuggerStatement = 182, >DebuggerStatement : SyntaxKind - VariableDeclaration = 185, + VariableDeclaration = 183, >VariableDeclaration : SyntaxKind - FunctionDeclaration = 186, + FunctionDeclaration = 184, >FunctionDeclaration : SyntaxKind - FunctionBlock = 187, ->FunctionBlock : SyntaxKind - - ClassDeclaration = 188, + ClassDeclaration = 185, >ClassDeclaration : SyntaxKind - InterfaceDeclaration = 189, + InterfaceDeclaration = 186, >InterfaceDeclaration : SyntaxKind - TypeAliasDeclaration = 190, + TypeAliasDeclaration = 187, >TypeAliasDeclaration : SyntaxKind - EnumDeclaration = 191, + EnumDeclaration = 188, >EnumDeclaration : SyntaxKind - ModuleDeclaration = 192, + ModuleDeclaration = 189, >ModuleDeclaration : SyntaxKind - ModuleBlock = 193, + ModuleBlock = 190, >ModuleBlock : SyntaxKind - ImportDeclaration = 194, + ImportDeclaration = 191, >ImportDeclaration : SyntaxKind - ExportAssignment = 195, + ExportAssignment = 192, >ExportAssignment : SyntaxKind - CaseClause = 196, + ExternalModuleReference = 193, +>ExternalModuleReference : SyntaxKind + + CaseClause = 194, >CaseClause : SyntaxKind - DefaultClause = 197, + DefaultClause = 195, >DefaultClause : SyntaxKind - HeritageClause = 198, + HeritageClause = 196, >HeritageClause : SyntaxKind - PropertyAssignment = 199, + CatchClause = 197, +>CatchClause : SyntaxKind + + PropertyAssignment = 198, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 200, + ShorthandPropertyAssignment = 199, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 201, + EnumMember = 200, >EnumMember : SyntaxKind - SourceFile = 202, + SourceFile = 201, >SourceFile : SyntaxKind - Program = 203, + Program = 202, >Program : SyntaxKind - SyntaxList = 204, + SyntaxList = 203, >SyntaxList : SyntaxKind - Count = 205, + Count = 204, >Count : SyntaxKind FirstAssignment = 51, @@ -706,10 +701,10 @@ declare module ts { LastFutureReservedWord = 108, >LastFutureReservedWord : SyntaxKind - FirstTypeNode = 133, + FirstTypeNode = 132, >FirstTypeNode : SyntaxKind - LastTypeNode = 141, + LastTypeNode = 140, >LastTypeNode : SyntaxKind FirstPunctuation = 13, @@ -718,7 +713,7 @@ declare module ts { LastPunctuation = 62, >LastPunctuation : SyntaxKind - FirstToken = 1, + FirstToken = 0, >FirstToken : SyntaxKind LastToken = 119, @@ -753,6 +748,9 @@ declare module ts { LastBinaryOperator = 62, >LastBinaryOperator : SyntaxKind + + FirstNode = 120, +>FirstNode : SyntaxKind } const enum NodeFlags { >NodeFlags : NodeFlags @@ -763,12 +761,6 @@ declare module ts { Ambient = 2, >Ambient : NodeFlags - QuestionMark = 4, ->QuestionMark : NodeFlags - - Rest = 8, ->Rest : NodeFlags - Public = 16, >Public : NodeFlags @@ -822,6 +814,12 @@ declare module ts { GeneratorParameter = 8, >GeneratorParameter : ParserContextFlags + + ContainsError = 16, +>ContainsError : ParserContextFlags + + HasPropagatedChildContainsErrorFlag = 32, +>HasPropagatedChildContainsErrorFlag : ParserContextFlags } interface Node extends TextRange { >Node : Node @@ -876,9 +874,9 @@ declare module ts { hasTrailingComma?: boolean; >hasTrailingComma : boolean } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { >ModifiersArray : ModifiersArray ->Array : T[] +>NodeArray : NodeArray >Node : Node flags: number; @@ -908,23 +906,6 @@ declare module ts { >Identifier : Identifier >QualifiedName : QualifiedName - interface ParsedSignature { ->ParsedSignature : ParsedSignature - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; >DeclarationName : Identifier | LiteralExpression | ComputedPropertyName >Identifier : Identifier @@ -966,10 +947,23 @@ declare module ts { >expression : Expression >Expression : Expression } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { >SignatureDeclaration : SignatureDeclaration >Declaration : Declaration ->ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface VariableDeclaration extends Declaration { >VariableDeclaration : VariableDeclaration @@ -985,6 +979,31 @@ declare module ts { initializer?: Expression; >initializer : Expression +>Expression : Expression + } + interface ParameterDeclaration extends Declaration { +>ParameterDeclaration : ParameterDeclaration +>Declaration : Declaration + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode | StringLiteralExpression; +>type : TypeNode | StringLiteralExpression +>TypeNode : TypeNode +>StringLiteralExpression : StringLiteralExpression + + initializer?: Expression; +>initializer : Expression >Expression : Expression } interface PropertyDeclaration extends Declaration, ClassElement { @@ -992,6 +1011,13 @@ declare module ts { >Declaration : Declaration >ClassElement : ClassElement + _propertyDeclarationBrand: any; +>_propertyDeclarationBrand : any + + questionToken?: Node; +>questionToken : Node +>Node : Node + type?: TypeNode; >type : TypeNode >TypeNode : TypeNode @@ -1000,17 +1026,53 @@ declare module ts { >initializer : Expression >Expression : Expression } - interface ShortHandPropertyDeclaration extends Declaration { ->ShortHandPropertyDeclaration : ShortHandPropertyDeclaration + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableDeclaration : VariableDeclaration +>ParameterDeclaration : ParameterDeclaration + + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; +>VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>PropertyDeclaration : PropertyDeclaration + + interface ObjectLiteralElement extends Declaration { +>ObjectLiteralElement : ObjectLiteralElement >Declaration : Declaration + _objectLiteralBrandBrand: any; +>_objectLiteralBrandBrand : any + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { +>ShorthandPropertyAssignment : ShorthandPropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + name: Identifier; >name : Identifier >Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node } - interface ParameterDeclaration extends VariableDeclaration { ->ParameterDeclaration : ParameterDeclaration ->VariableDeclaration : VariableDeclaration + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression } /** * Several node kinds share function-like features such as a signature, @@ -1029,6 +1091,10 @@ declare module ts { asteriskToken?: Node; >asteriskToken : Node +>Node : Node + + questionToken?: Node; +>questionToken : Node >Node : Node body?: Block | Expression; @@ -1049,10 +1115,11 @@ declare module ts { >body : Block >Block : Block } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >MethodDeclaration : MethodDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement body?: Block; >body : Block @@ -1067,12 +1134,16 @@ declare module ts { >body : Block >Block : Block } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >AccessorDeclaration : AccessorDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement - body?: Block; + _accessorDeclarationBrand: any; +>_accessorDeclarationBrand : any + + body: Block; >body : Block >Block : Block } @@ -1087,6 +1158,17 @@ declare module ts { interface TypeNode extends Node { >TypeNode : TypeNode >Node : Node + + _typeNodeBrand: any; +>_typeNodeBrand : any + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { +>FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode +>TypeNode : TypeNode +>SignatureDeclaration : SignatureDeclaration + + _functionOrConstructorTypeNodeBrand: any; +>_functionOrConstructorTypeNodeBrand : any } interface TypeReferenceNode extends TypeNode { >TypeReferenceNode : TypeReferenceNode @@ -1152,13 +1234,6 @@ declare module ts { type: TypeNode; >type : TypeNode >TypeNode : TypeNode - } - interface StringLiteralTypeNode extends TypeNode { ->StringLiteralTypeNode : StringLiteralTypeNode ->TypeNode : TypeNode - - text: string; ->text : string } interface Expression extends Node { >Expression : Expression @@ -1318,6 +1393,16 @@ declare module ts { text: string; >text : string + + isUnterminated?: boolean; +>isUnterminated : boolean + } + interface StringLiteralExpression extends LiteralExpression { +>StringLiteralExpression : StringLiteralExpression +>LiteralExpression : LiteralExpression + + _stringLiteralExpressionBrand: any; +>_stringLiteralExpressionBrand : any } interface TemplateExpression extends PrimaryExpression { >TemplateExpression : TemplateExpression @@ -1366,10 +1451,10 @@ declare module ts { >PrimaryExpression : PrimaryExpression >Declaration : Declaration - properties: NodeArray; ->properties : NodeArray + properties: NodeArray; +>properties : NodeArray >NodeArray : NodeArray ->Declaration : Declaration +>ObjectLiteralElement : ObjectLiteralElement } interface PropertyAccessExpression extends MemberExpression { >PropertyAccessExpression : PropertyAccessExpression @@ -1391,7 +1476,7 @@ declare module ts { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression - argumentExpression: Expression; + argumentExpression?: Expression; >argumentExpression : Expression >Expression : Expression } @@ -1598,12 +1683,12 @@ declare module ts { >Expression : Expression clauses: NodeArray; ->clauses : NodeArray +>clauses : NodeArray >NodeArray : NodeArray ->CaseOrDefaultClause : CaseOrDefaultClause +>CaseOrDefaultClause : CaseClause | DefaultClause } - interface CaseOrDefaultClause extends Node { ->CaseOrDefaultClause : CaseOrDefaultClause + interface CaseClause extends Node { +>CaseClause : CaseClause >Node : Node expression?: Expression; @@ -1615,6 +1700,20 @@ declare module ts { >NodeArray : NodeArray >Statement : Statement } + interface DefaultClause extends Node { +>DefaultClause : DefaultClause +>Node : Node + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + type CaseOrDefaultClause = CaseClause | DefaultClause; +>CaseOrDefaultClause : CaseClause | DefaultClause +>CaseClause : CaseClause +>DefaultClause : DefaultClause + interface LabeledStatement extends Statement { >LabeledStatement : LabeledStatement >Statement : Statement @@ -1643,26 +1742,29 @@ declare module ts { >tryBlock : Block >Block : Block - catchBlock?: CatchBlock; ->catchBlock : CatchBlock ->CatchBlock : CatchBlock + catchClause?: CatchClause; +>catchClause : CatchClause +>CatchClause : CatchClause finallyBlock?: Block; >finallyBlock : Block >Block : Block } - interface CatchBlock extends Block, Declaration { ->CatchBlock : CatchBlock ->Block : Block + interface CatchClause extends Declaration { +>CatchClause : CatchClause >Declaration : Declaration - variable: Identifier; ->variable : Identifier + name: Identifier; +>name : Identifier >Identifier : Identifier type?: TypeNode; >type : TypeNode >TypeNode : TypeNode + + block: Block; +>block : Block +>Block : Block } interface ModuleElement extends Node { >ModuleElement : ModuleElement @@ -1812,13 +1914,18 @@ declare module ts { >name : Identifier >Identifier : Identifier - entityName?: EntityName; ->entityName : Identifier | QualifiedName + moduleReference: EntityName | ExternalModuleReference; +>moduleReference : Identifier | QualifiedName | ExternalModuleReference >EntityName : Identifier | QualifiedName +>ExternalModuleReference : ExternalModuleReference + } + interface ExternalModuleReference extends Node { +>ExternalModuleReference : ExternalModuleReference +>Node : Node - externalModuleName?: LiteralExpression; ->externalModuleName : LiteralExpression ->LiteralExpression : LiteralExpression + expression?: Expression; +>expression : Expression +>Expression : Expression } interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment @@ -1852,6 +1959,10 @@ declare module ts { >NodeArray : NodeArray >ModuleElement : ModuleElement + endOfFileToken: Node; +>endOfFileToken : Node +>Node : Node + filename: string; >filename : string @@ -1881,8 +1992,8 @@ declare module ts { >referencedFiles : FileReference[] >FileReference : FileReference - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] + referenceDiagnostics: Diagnostic[]; +>referenceDiagnostics : Diagnostic[] >Diagnostic : Diagnostic parseDiagnostics: Diagnostic[]; @@ -1895,6 +2006,10 @@ declare module ts { getSyntacticDiagnostics(): Diagnostic[]; >getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] >Diagnostic : Diagnostic hasNoDefaultLib: boolean; @@ -2088,23 +2203,14 @@ declare module ts { getTypeCount(): number; >getTypeCount : () => number - checkProgram(): void; ->checkProgram : () => void - emitFiles(targetSourceFile?: SourceFile): EmitResult; >emitFiles : (targetSourceFile?: SourceFile) => EmitResult >targetSourceFile : SourceFile >SourceFile : SourceFile >EmitResult : EmitResult - getParentOfSymbol(symbol: Symbol): Symbol; ->getParentOfSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; ->getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; +>getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type >symbol : Symbol >Symbol : Symbol >node : Node @@ -2160,8 +2266,8 @@ declare module ts { >SymbolFlags : SymbolFlags >Symbol : Symbol - getSymbolInfo(node: Node): Symbol; ->getSymbolInfo : (node: Node) => Symbol + getSymbolAtLocation(node: Node): Symbol; +>getSymbolAtLocation : (node: Node) => Symbol >node : Node >Node : Node >Symbol : Symbol @@ -2172,8 +2278,8 @@ declare module ts { >Node : Node >Symbol : Symbol - getTypeOfNode(node: Node): Type; ->getTypeOfNode : (node: Node) => Type + getTypeAtLocation(node: Node): Type; +>getTypeAtLocation : (node: Node) => Type >node : Node >Node : Node >Type : Type @@ -2217,10 +2323,10 @@ declare module ts { >Symbol : Symbol >Symbol : Symbol - getContextualType(node: Node): Type; ->getContextualType : (node: Node) => Type ->node : Node ->Node : Node + getContextualType(node: Expression): Type; +>getContextualType : (node: Expression) => Type +>node : Expression +>Expression : Expression >Type : Type getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; @@ -2553,8 +2659,10 @@ declare module ts { >node : EnumMember >EnumMember : EnumMember - hasSemanticErrors(): boolean; ->hasSemanticErrors : () => boolean + hasSemanticErrors(sourceFile?: SourceFile): boolean; +>hasSemanticErrors : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile isDeclarationVisible(node: Declaration): boolean; >isDeclarationVisible : (node: Declaration) => boolean @@ -2566,10 +2674,11 @@ declare module ts { >node : FunctionLikeDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->location : Node ->Node : Node + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration +>AccessorDeclaration : AccessorDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration >enclosingDeclaration : Node >Node : Node >flags : TypeFormatFlags @@ -3027,9 +3136,6 @@ declare module ts { ObjectType = 48128, >ObjectType : TypeFlags - - Structured = 65025, ->Structured : TypeFlags } interface Type { >Type : Type @@ -3361,14 +3467,6 @@ declare module ts { */ isEarly?: boolean; >isEarly : boolean - - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; ->isParseError : boolean } enum DiagnosticCategory { >DiagnosticCategory : DiagnosticCategory @@ -3459,6 +3557,9 @@ declare module ts { preserveConstEnums?: boolean; >preserveConstEnums : boolean + allowNonTsExtensions?: boolean; +>allowNonTsExtensions : boolean + [option: string]: string | number | boolean; >option : string } @@ -3927,8 +4028,10 @@ declare module ts { >message : string >SourceFile : SourceFile - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken @@ -3956,9 +4059,7 @@ declare module ts { >getNewLine : () => string } } -declare module ts { ->ts : typeof ts - +declare module "typescript" { interface ErrorCallback { >ErrorCallback : ErrorCallback @@ -4004,6 +4105,9 @@ declare module ts { isReservedWord(): boolean; >isReservedWord : () => boolean + isUnterminated(): boolean; +>isUnterminated : () => boolean + reScanGreaterToken(): SyntaxKind; >reScanGreaterToken : () => SyntaxKind >SyntaxKind : SyntaxKind @@ -4028,6 +4132,13 @@ declare module ts { >setTextPos : (textPos: number) => void >textPos : number + lookAhead(callback: () => T): T; +>lookAhead : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + tryScan(callback: () => T): T; >tryScan : (callback: () => T) => T >T : T @@ -4116,35 +4227,17 @@ declare module ts { >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget >skipTrivia : boolean >text : string >onError : ErrorCallback >ErrorCallback : ErrorCallback ->onComment : CommentCallback ->CommentCallback : CommentCallback >Scanner : Scanner } -declare module ts { ->ts : typeof ts - - interface ReferencePathMatchResult { ->ReferencePathMatchResult : ReferencePathMatchResult - - fileReference?: FileReference; ->fileReference : FileReference ->FileReference : FileReference - - diagnostic?: DiagnosticMessage; ->diagnostic : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - isNoDefaultLib?: boolean; ->isNoDefaultLib : boolean - } +declare module "typescript" { function getNodeConstructor(kind: SyntaxKind): new () => Node; >getNodeConstructor : (kind: SyntaxKind) => new () => Node >kind : SyntaxKind @@ -4185,9 +4278,7 @@ declare module ts { >CompilerHost : CompilerHost >Program : Program } -declare module ts { ->ts : typeof ts - +declare module "typescript" { function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; >createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker >program : Program @@ -4195,8 +4286,9 @@ declare module ts { >fullTypeCheck : boolean >TypeChecker : TypeChecker } -declare module ts { ->ts : typeof ts +declare module "typescript" { + var servicesVersion: string; +>servicesVersion : string interface Node { >Node : Node @@ -4463,18 +4555,20 @@ declare module ts { >fileName : string >IScriptSnapshot : IScriptSnapshot - getLocalizedDiagnosticMessages(): any; + getLocalizedDiagnosticMessages?(): any; >getLocalizedDiagnosticMessages : () => any - getCancellationToken(): CancellationToken; + getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken >CancellationToken : CancellationToken getCurrentDirectory(): string; >getCurrentDirectory : () => string - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions } interface LanguageService { >LanguageService : LanguageService @@ -4510,11 +4604,10 @@ declare module ts { >TextSpan : TextSpan >ClassifiedSpan : ClassifiedSpan - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo >fileName : string >position : number ->isMemberCompletion : boolean >CompletionInfo : CompletionInfo getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; @@ -5576,12 +5669,10 @@ declare module ts { static typeParameterName: string; >typeParameterName : string - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart + static typeAlias: string; +>typeAlias : string + } interface DisplayPartsSymbolWriter extends SymbolWriter { >DisplayPartsSymbolWriter : DisplayPartsSymbolWriter >SymbolWriter : SymbolWriter @@ -5590,6 +5681,11 @@ declare module ts { >displayParts : () => SymbolDisplayPart[] >SymbolDisplayPart : SymbolDisplayPart } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + function getDefaultCompilerOptions(): CompilerOptions; >getDefaultCompilerOptions : () => CompilerOptions >CompilerOptions : CompilerOptions @@ -5641,7 +5737,4 @@ declare module ts { >Logger : Logger >Classifier : Classifier } - -export = ts; ->ts : typeof ts diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js index e1f55f8a4c2..fff2226f320 100644 --- a/tests/baselines/reference/APISample_standalone_compile.js +++ b/tests/baselines/reference/APISample_standalone_compile.js @@ -150,92 +150,91 @@ declare module ts { SetKeyword = 117, StringKeyword = 118, TypeKeyword = 119, - Missing = 120, - QualifiedName = 121, - ComputedPropertyName = 122, - TypeParameter = 123, - Parameter = 124, - Property = 125, - Method = 126, - Constructor = 127, - GetAccessor = 128, - SetAccessor = 129, - CallSignature = 130, - ConstructSignature = 131, - IndexSignature = 132, - TypeReference = 133, - FunctionType = 134, - ConstructorType = 135, - TypeQuery = 136, - TypeLiteral = 137, - ArrayType = 138, - TupleType = 139, - UnionType = 140, - ParenthesizedType = 141, - ArrayLiteralExpression = 142, - ObjectLiteralExpression = 143, - PropertyAccessExpression = 144, - ElementAccessExpression = 145, - CallExpression = 146, - NewExpression = 147, - TaggedTemplateExpression = 148, - TypeAssertionExpression = 149, - ParenthesizedExpression = 150, - FunctionExpression = 151, - ArrowFunction = 152, - DeleteExpression = 153, - TypeOfExpression = 154, - VoidExpression = 155, - PrefixUnaryExpression = 156, - PostfixUnaryExpression = 157, - BinaryExpression = 158, - ConditionalExpression = 159, - TemplateExpression = 160, - YieldExpression = 161, - OmittedExpression = 162, - TemplateSpan = 163, - Block = 164, - VariableStatement = 165, - EmptyStatement = 166, - ExpressionStatement = 167, - IfStatement = 168, - DoStatement = 169, - WhileStatement = 170, - ForStatement = 171, - ForInStatement = 172, - ContinueStatement = 173, - BreakStatement = 174, - ReturnStatement = 175, - WithStatement = 176, - SwitchStatement = 177, - LabeledStatement = 178, - ThrowStatement = 179, - TryStatement = 180, - TryBlock = 181, - CatchBlock = 182, - FinallyBlock = 183, - DebuggerStatement = 184, - VariableDeclaration = 185, - FunctionDeclaration = 186, - FunctionBlock = 187, - ClassDeclaration = 188, - InterfaceDeclaration = 189, - TypeAliasDeclaration = 190, - EnumDeclaration = 191, - ModuleDeclaration = 192, - ModuleBlock = 193, - ImportDeclaration = 194, - ExportAssignment = 195, - CaseClause = 196, - DefaultClause = 197, - HeritageClause = 198, - PropertyAssignment = 199, - ShorthandPropertyAssignment = 200, - EnumMember = 201, - SourceFile = 202, - Program = 203, - SyntaxList = 204, - Count = 205, + QualifiedName = 120, + ComputedPropertyName = 121, + TypeParameter = 122, + Parameter = 123, + Property = 124, + Method = 125, + Constructor = 126, + GetAccessor = 127, + SetAccessor = 128, + CallSignature = 129, + ConstructSignature = 130, + IndexSignature = 131, + TypeReference = 132, + FunctionType = 133, + ConstructorType = 134, + TypeQuery = 135, + TypeLiteral = 136, + ArrayType = 137, + TupleType = 138, + UnionType = 139, + ParenthesizedType = 140, + ArrayLiteralExpression = 141, + ObjectLiteralExpression = 142, + PropertyAccessExpression = 143, + ElementAccessExpression = 144, + CallExpression = 145, + NewExpression = 146, + TaggedTemplateExpression = 147, + TypeAssertionExpression = 148, + ParenthesizedExpression = 149, + FunctionExpression = 150, + ArrowFunction = 151, + DeleteExpression = 152, + TypeOfExpression = 153, + VoidExpression = 154, + PrefixUnaryExpression = 155, + PostfixUnaryExpression = 156, + BinaryExpression = 157, + ConditionalExpression = 158, + TemplateExpression = 159, + YieldExpression = 160, + OmittedExpression = 161, + TemplateSpan = 162, + Block = 163, + VariableStatement = 164, + EmptyStatement = 165, + ExpressionStatement = 166, + IfStatement = 167, + DoStatement = 168, + WhileStatement = 169, + ForStatement = 170, + ForInStatement = 171, + ContinueStatement = 172, + BreakStatement = 173, + ReturnStatement = 174, + WithStatement = 175, + SwitchStatement = 176, + LabeledStatement = 177, + ThrowStatement = 178, + TryStatement = 179, + TryBlock = 180, + FinallyBlock = 181, + DebuggerStatement = 182, + VariableDeclaration = 183, + FunctionDeclaration = 184, + ClassDeclaration = 185, + InterfaceDeclaration = 186, + TypeAliasDeclaration = 187, + EnumDeclaration = 188, + ModuleDeclaration = 189, + ModuleBlock = 190, + ImportDeclaration = 191, + ExportAssignment = 192, + ExternalModuleReference = 193, + CaseClause = 194, + DefaultClause = 195, + HeritageClause = 196, + CatchClause = 197, + PropertyAssignment = 198, + ShorthandPropertyAssignment = 199, + EnumMember = 200, + SourceFile = 201, + Program = 202, + SyntaxList = 203, + Count = 204, FirstAssignment = 51, LastAssignment = 62, FirstReservedWord = 64, @@ -244,11 +243,11 @@ declare module ts { LastKeyword = 119, FirstFutureReservedWord = 100, LastFutureReservedWord = 108, - FirstTypeNode = 133, - LastTypeNode = 141, + FirstTypeNode = 132, + LastTypeNode = 140, FirstPunctuation = 13, LastPunctuation = 62, - FirstToken = 1, + FirstToken = 0, LastToken = 119, FirstTriviaToken = 2, LastTriviaToken = 5, @@ -260,12 +259,11 @@ declare module ts { LastOperator = 62, FirstBinaryOperator = 23, LastBinaryOperator = 62, + FirstNode = 120, } const enum NodeFlags { Export = 1, Ambient = 2, - QuestionMark = 4, - Rest = 8, Public = 16, Private = 32, Protected = 64, @@ -285,6 +283,8 @@ declare module ts { DisallowIn = 2, Yield = 4, GeneratorParameter = 8, + ContainsError = 16, + HasPropagatedChildContainsErrorFlag = 32, } interface Node extends TextRange { kind: SyntaxKind; @@ -301,7 +301,7 @@ declare module ts { interface NodeArray extends Array, TextRange { hasTrailingComma?: boolean; } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { flags: number; } interface Identifier extends PrimaryExpression { @@ -312,11 +312,6 @@ declare module ts { right: Identifier; } type EntityName = Identifier | QualifiedName; - interface ParsedSignature { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; interface Declaration extends Node { _declarationBrand: any; @@ -330,21 +325,43 @@ declare module ts { constraint?: TypeNode; expression?: Expression; } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; } interface VariableDeclaration extends Declaration { name: Identifier; type?: TypeNode; initializer?: Expression; } + interface ParameterDeclaration extends Declaration { + dotDotDotToken?: Node; + name: Identifier; + questionToken?: Node; + type?: TypeNode | StringLiteralExpression; + initializer?: Expression; + } interface PropertyDeclaration extends Declaration, ClassElement { + _propertyDeclarationBrand: any; + questionToken?: Node; type?: TypeNode; initializer?: Expression; } - interface ShortHandPropertyDeclaration extends Declaration { - name: Identifier; + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; + interface ObjectLiteralElement extends Declaration { + _objectLiteralBrandBrand: any; } - interface ParameterDeclaration extends VariableDeclaration { + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface PropertyAssignment extends ObjectLiteralElement { + _propertyAssignmentBrand: any; + name: DeclarationName; + questionToken?: Node; + initializer: Expression; } /** * Several node kinds share function-like features such as a signature, @@ -357,25 +374,31 @@ declare module ts { interface FunctionLikeDeclaration extends SignatureDeclaration { _functionLikeDeclarationBrand: any; asteriskToken?: Node; + questionToken?: Node; body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { name: Identifier; body?: Block; } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { body?: Block; } interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { body?: Block; } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + _accessorDeclarationBrand: any; + body: Block; } interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { _indexSignatureDeclarationBrand: any; } interface TypeNode extends Node { + _typeNodeBrand: any; + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { + _functionOrConstructorTypeNodeBrand: any; } interface TypeReferenceNode extends TypeNode { typeName: EntityName; @@ -399,9 +422,6 @@ declare module ts { interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } - interface StringLiteralTypeNode extends TypeNode { - text: string; - } interface Expression extends Node { _expressionBrand: any; contextualType?: Type; @@ -458,6 +478,10 @@ declare module ts { } interface LiteralExpression extends PrimaryExpression { text: string; + isUnterminated?: boolean; + } + interface StringLiteralExpression extends LiteralExpression { + _stringLiteralExpressionBrand: any; } interface TemplateExpression extends PrimaryExpression { head: LiteralExpression; @@ -474,7 +498,7 @@ declare module ts { elements: NodeArray; } interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; + properties: NodeArray; } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; @@ -482,7 +506,7 @@ declare module ts { } interface ElementAccessExpression extends MemberExpression { expression: LeftHandSideExpression; - argumentExpression: Expression; + argumentExpression?: Expression; } interface CallExpression extends LeftHandSideExpression { expression: LeftHandSideExpression; @@ -551,10 +575,14 @@ declare module ts { expression: Expression; clauses: NodeArray; } - interface CaseOrDefaultClause extends Node { + interface CaseClause extends Node { expression?: Expression; statements: NodeArray; } + interface DefaultClause extends Node { + statements: NodeArray; + } + type CaseOrDefaultClause = CaseClause | DefaultClause; interface LabeledStatement extends Statement { label: Identifier; statement: Statement; @@ -564,12 +592,13 @@ declare module ts { } interface TryStatement extends Statement { tryBlock: Block; - catchBlock?: CatchBlock; + catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchBlock extends Block, Declaration { - variable: Identifier; + interface CatchClause extends Declaration { + name: Identifier; type?: TypeNode; + block: Block; } interface ModuleElement extends Node { _moduleElementBrand: any; @@ -614,8 +643,10 @@ declare module ts { } interface ImportDeclaration extends Declaration, ModuleElement { name: Identifier; - entityName?: EntityName; - externalModuleName?: LiteralExpression; + moduleReference: EntityName | ExternalModuleReference; + } + interface ExternalModuleReference extends Node { + expression?: Expression; } interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; @@ -628,6 +659,7 @@ declare module ts { } interface SourceFile extends Declaration { statements: NodeArray; + endOfFileToken: Node; filename: string; text: string; getLineAndCharacterFromPosition(position: number): LineAndCharacter; @@ -636,10 +668,11 @@ declare module ts { amdDependencies: string[]; amdModuleName: string; referencedFiles: FileReference[]; - semanticDiagnostics: Diagnostic[]; + referenceDiagnostics: Diagnostic[]; parseDiagnostics: Diagnostic[]; grammarDiagnostics: Diagnostic[]; getSyntacticDiagnostics(): Diagnostic[]; + semanticDiagnostics: Diagnostic[]; hasNoDefaultLib: boolean; externalModuleIndicator: Node; nodeCount: number; @@ -701,10 +734,8 @@ declare module ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; - checkProgram(): void; emitFiles(targetSourceFile?: SourceFile): EmitResult; - getParentOfSymbol(symbol: Symbol): Symbol; - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type; getPropertiesOfType(type: Type): Symbol[]; getPropertyOfType(type: Type, propertyName: string): Symbol; @@ -712,16 +743,16 @@ declare module ts { getIndexTypeOfType(type: Type, kind: IndexKind): Type; getReturnTypeOfSignature(signature: Signature): Type; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolInfo(node: Node): Symbol; + getSymbolAtLocation(node: Node): Symbol; getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeOfNode(node: Node): Type; + getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; getSymbolDisplayBuilder(): SymbolDisplayBuilder; getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Node): Type; + getContextualType(node: Expression): Type; getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; @@ -795,10 +826,10 @@ declare module ts { isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(): boolean; + hasSemanticErrors(sourceFile?: SourceFile): boolean; isDeclarationVisible(node: Declaration): boolean; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; @@ -942,7 +973,6 @@ declare module ts { StringLike = 258, NumberLike = 132, ObjectType = 48128, - Structured = 65025, } interface Type { flags: TypeFlags; @@ -1055,12 +1085,6 @@ declare module ts { * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit */ isEarly?: boolean; - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; } enum DiagnosticCategory { Warning = 0, @@ -1092,6 +1116,7 @@ declare module ts { version?: boolean; watch?: boolean; preserveConstEnums?: boolean; + allowNonTsExtensions?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1252,7 +1277,7 @@ declare module ts { } interface CompilerHost { getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; getCancellationToken?(): CancellationToken; writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; getCurrentDirectory(): string; @@ -1278,12 +1303,14 @@ declare module ts { hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; isReservedWord(): boolean; + isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; reScanTemplateToken(): SyntaxKind; scan(): SyntaxKind; setText(text: string): void; setTextPos(textPos: number): void; + lookAhead(callback: () => T): T; tryScan(callback: () => T): T; } function tokenToString(t: SyntaxKind): string; @@ -1305,14 +1332,9 @@ declare module ts { function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; } declare module ts { - interface ReferencePathMatchResult { - fileReference?: FileReference; - diagnostic?: DiagnosticMessage; - isNoDefaultLib?: boolean; - } function getNodeConstructor(kind: SyntaxKind): new () => Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; @@ -1322,6 +1344,7 @@ declare module ts { function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; } declare module ts { + var servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1409,10 +1432,10 @@ declare module ts { getScriptVersion(fileName: string): string; getScriptIsOpen(fileName: string): boolean; getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages(): any; - getCancellationToken(): CancellationToken; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; getCurrentDirectory(): string; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; } interface LanguageService { cleanupSemanticCache(): void; @@ -1421,7 +1444,7 @@ declare module ts { getCompilerOptionsDiagnostics(): Diagnostic[]; getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; @@ -1809,11 +1832,12 @@ declare module ts { static interfaceName: string; static moduleName: string; static typeParameterName: string; + static typeAlias: string; } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; function getDefaultCompilerOptions(): CompilerOptions; class OperationCanceledException { } diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types index ebde76e4aa4..c69e655aec1 100644 --- a/tests/baselines/reference/APISample_standalone_compile.types +++ b/tests/baselines/reference/APISample_standalone_compile.types @@ -421,262 +421,259 @@ declare module ts { TypeKeyword = 119, >TypeKeyword : SyntaxKind - Missing = 120, ->Missing : SyntaxKind - - QualifiedName = 121, + QualifiedName = 120, >QualifiedName : SyntaxKind - ComputedPropertyName = 122, + ComputedPropertyName = 121, >ComputedPropertyName : SyntaxKind - TypeParameter = 123, + TypeParameter = 122, >TypeParameter : SyntaxKind - Parameter = 124, + Parameter = 123, >Parameter : SyntaxKind - Property = 125, + Property = 124, >Property : SyntaxKind - Method = 126, + Method = 125, >Method : SyntaxKind - Constructor = 127, + Constructor = 126, >Constructor : SyntaxKind - GetAccessor = 128, + GetAccessor = 127, >GetAccessor : SyntaxKind - SetAccessor = 129, + SetAccessor = 128, >SetAccessor : SyntaxKind - CallSignature = 130, + CallSignature = 129, >CallSignature : SyntaxKind - ConstructSignature = 131, + ConstructSignature = 130, >ConstructSignature : SyntaxKind - IndexSignature = 132, + IndexSignature = 131, >IndexSignature : SyntaxKind - TypeReference = 133, + TypeReference = 132, >TypeReference : SyntaxKind - FunctionType = 134, + FunctionType = 133, >FunctionType : SyntaxKind - ConstructorType = 135, + ConstructorType = 134, >ConstructorType : SyntaxKind - TypeQuery = 136, + TypeQuery = 135, >TypeQuery : SyntaxKind - TypeLiteral = 137, + TypeLiteral = 136, >TypeLiteral : SyntaxKind - ArrayType = 138, + ArrayType = 137, >ArrayType : SyntaxKind - TupleType = 139, + TupleType = 138, >TupleType : SyntaxKind - UnionType = 140, + UnionType = 139, >UnionType : SyntaxKind - ParenthesizedType = 141, + ParenthesizedType = 140, >ParenthesizedType : SyntaxKind - ArrayLiteralExpression = 142, + ArrayLiteralExpression = 141, >ArrayLiteralExpression : SyntaxKind - ObjectLiteralExpression = 143, + ObjectLiteralExpression = 142, >ObjectLiteralExpression : SyntaxKind - PropertyAccessExpression = 144, + PropertyAccessExpression = 143, >PropertyAccessExpression : SyntaxKind - ElementAccessExpression = 145, + ElementAccessExpression = 144, >ElementAccessExpression : SyntaxKind - CallExpression = 146, + CallExpression = 145, >CallExpression : SyntaxKind - NewExpression = 147, + NewExpression = 146, >NewExpression : SyntaxKind - TaggedTemplateExpression = 148, + TaggedTemplateExpression = 147, >TaggedTemplateExpression : SyntaxKind - TypeAssertionExpression = 149, + TypeAssertionExpression = 148, >TypeAssertionExpression : SyntaxKind - ParenthesizedExpression = 150, + ParenthesizedExpression = 149, >ParenthesizedExpression : SyntaxKind - FunctionExpression = 151, + FunctionExpression = 150, >FunctionExpression : SyntaxKind - ArrowFunction = 152, + ArrowFunction = 151, >ArrowFunction : SyntaxKind - DeleteExpression = 153, + DeleteExpression = 152, >DeleteExpression : SyntaxKind - TypeOfExpression = 154, + TypeOfExpression = 153, >TypeOfExpression : SyntaxKind - VoidExpression = 155, + VoidExpression = 154, >VoidExpression : SyntaxKind - PrefixUnaryExpression = 156, + PrefixUnaryExpression = 155, >PrefixUnaryExpression : SyntaxKind - PostfixUnaryExpression = 157, + PostfixUnaryExpression = 156, >PostfixUnaryExpression : SyntaxKind - BinaryExpression = 158, + BinaryExpression = 157, >BinaryExpression : SyntaxKind - ConditionalExpression = 159, + ConditionalExpression = 158, >ConditionalExpression : SyntaxKind - TemplateExpression = 160, + TemplateExpression = 159, >TemplateExpression : SyntaxKind - YieldExpression = 161, + YieldExpression = 160, >YieldExpression : SyntaxKind - OmittedExpression = 162, + OmittedExpression = 161, >OmittedExpression : SyntaxKind - TemplateSpan = 163, + TemplateSpan = 162, >TemplateSpan : SyntaxKind - Block = 164, + Block = 163, >Block : SyntaxKind - VariableStatement = 165, + VariableStatement = 164, >VariableStatement : SyntaxKind - EmptyStatement = 166, + EmptyStatement = 165, >EmptyStatement : SyntaxKind - ExpressionStatement = 167, + ExpressionStatement = 166, >ExpressionStatement : SyntaxKind - IfStatement = 168, + IfStatement = 167, >IfStatement : SyntaxKind - DoStatement = 169, + DoStatement = 168, >DoStatement : SyntaxKind - WhileStatement = 170, + WhileStatement = 169, >WhileStatement : SyntaxKind - ForStatement = 171, + ForStatement = 170, >ForStatement : SyntaxKind - ForInStatement = 172, + ForInStatement = 171, >ForInStatement : SyntaxKind - ContinueStatement = 173, + ContinueStatement = 172, >ContinueStatement : SyntaxKind - BreakStatement = 174, + BreakStatement = 173, >BreakStatement : SyntaxKind - ReturnStatement = 175, + ReturnStatement = 174, >ReturnStatement : SyntaxKind - WithStatement = 176, + WithStatement = 175, >WithStatement : SyntaxKind - SwitchStatement = 177, + SwitchStatement = 176, >SwitchStatement : SyntaxKind - LabeledStatement = 178, + LabeledStatement = 177, >LabeledStatement : SyntaxKind - ThrowStatement = 179, + ThrowStatement = 178, >ThrowStatement : SyntaxKind - TryStatement = 180, + TryStatement = 179, >TryStatement : SyntaxKind - TryBlock = 181, + TryBlock = 180, >TryBlock : SyntaxKind - CatchBlock = 182, ->CatchBlock : SyntaxKind - - FinallyBlock = 183, + FinallyBlock = 181, >FinallyBlock : SyntaxKind - DebuggerStatement = 184, + DebuggerStatement = 182, >DebuggerStatement : SyntaxKind - VariableDeclaration = 185, + VariableDeclaration = 183, >VariableDeclaration : SyntaxKind - FunctionDeclaration = 186, + FunctionDeclaration = 184, >FunctionDeclaration : SyntaxKind - FunctionBlock = 187, ->FunctionBlock : SyntaxKind - - ClassDeclaration = 188, + ClassDeclaration = 185, >ClassDeclaration : SyntaxKind - InterfaceDeclaration = 189, + InterfaceDeclaration = 186, >InterfaceDeclaration : SyntaxKind - TypeAliasDeclaration = 190, + TypeAliasDeclaration = 187, >TypeAliasDeclaration : SyntaxKind - EnumDeclaration = 191, + EnumDeclaration = 188, >EnumDeclaration : SyntaxKind - ModuleDeclaration = 192, + ModuleDeclaration = 189, >ModuleDeclaration : SyntaxKind - ModuleBlock = 193, + ModuleBlock = 190, >ModuleBlock : SyntaxKind - ImportDeclaration = 194, + ImportDeclaration = 191, >ImportDeclaration : SyntaxKind - ExportAssignment = 195, + ExportAssignment = 192, >ExportAssignment : SyntaxKind - CaseClause = 196, + ExternalModuleReference = 193, +>ExternalModuleReference : SyntaxKind + + CaseClause = 194, >CaseClause : SyntaxKind - DefaultClause = 197, + DefaultClause = 195, >DefaultClause : SyntaxKind - HeritageClause = 198, + HeritageClause = 196, >HeritageClause : SyntaxKind - PropertyAssignment = 199, + CatchClause = 197, +>CatchClause : SyntaxKind + + PropertyAssignment = 198, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 200, + ShorthandPropertyAssignment = 199, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 201, + EnumMember = 200, >EnumMember : SyntaxKind - SourceFile = 202, + SourceFile = 201, >SourceFile : SyntaxKind - Program = 203, + Program = 202, >Program : SyntaxKind - SyntaxList = 204, + SyntaxList = 203, >SyntaxList : SyntaxKind - Count = 205, + Count = 204, >Count : SyntaxKind FirstAssignment = 51, @@ -703,10 +700,10 @@ declare module ts { LastFutureReservedWord = 108, >LastFutureReservedWord : SyntaxKind - FirstTypeNode = 133, + FirstTypeNode = 132, >FirstTypeNode : SyntaxKind - LastTypeNode = 141, + LastTypeNode = 140, >LastTypeNode : SyntaxKind FirstPunctuation = 13, @@ -715,7 +712,7 @@ declare module ts { LastPunctuation = 62, >LastPunctuation : SyntaxKind - FirstToken = 1, + FirstToken = 0, >FirstToken : SyntaxKind LastToken = 119, @@ -750,6 +747,9 @@ declare module ts { LastBinaryOperator = 62, >LastBinaryOperator : SyntaxKind + + FirstNode = 120, +>FirstNode : SyntaxKind } const enum NodeFlags { >NodeFlags : NodeFlags @@ -760,12 +760,6 @@ declare module ts { Ambient = 2, >Ambient : NodeFlags - QuestionMark = 4, ->QuestionMark : NodeFlags - - Rest = 8, ->Rest : NodeFlags - Public = 16, >Public : NodeFlags @@ -819,6 +813,12 @@ declare module ts { GeneratorParameter = 8, >GeneratorParameter : ParserContextFlags + + ContainsError = 16, +>ContainsError : ParserContextFlags + + HasPropagatedChildContainsErrorFlag = 32, +>HasPropagatedChildContainsErrorFlag : ParserContextFlags } interface Node extends TextRange { >Node : Node @@ -873,9 +873,9 @@ declare module ts { hasTrailingComma?: boolean; >hasTrailingComma : boolean } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { >ModifiersArray : ModifiersArray ->Array : T[] +>NodeArray : NodeArray >Node : Node flags: number; @@ -905,23 +905,6 @@ declare module ts { >Identifier : Identifier >QualifiedName : QualifiedName - interface ParsedSignature { ->ParsedSignature : ParsedSignature - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; >DeclarationName : Identifier | LiteralExpression | ComputedPropertyName >Identifier : Identifier @@ -963,10 +946,23 @@ declare module ts { >expression : Expression >Expression : Expression } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { >SignatureDeclaration : SignatureDeclaration >Declaration : Declaration ->ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface VariableDeclaration extends Declaration { >VariableDeclaration : VariableDeclaration @@ -982,6 +978,31 @@ declare module ts { initializer?: Expression; >initializer : Expression +>Expression : Expression + } + interface ParameterDeclaration extends Declaration { +>ParameterDeclaration : ParameterDeclaration +>Declaration : Declaration + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode | StringLiteralExpression; +>type : TypeNode | StringLiteralExpression +>TypeNode : TypeNode +>StringLiteralExpression : StringLiteralExpression + + initializer?: Expression; +>initializer : Expression >Expression : Expression } interface PropertyDeclaration extends Declaration, ClassElement { @@ -989,6 +1010,13 @@ declare module ts { >Declaration : Declaration >ClassElement : ClassElement + _propertyDeclarationBrand: any; +>_propertyDeclarationBrand : any + + questionToken?: Node; +>questionToken : Node +>Node : Node + type?: TypeNode; >type : TypeNode >TypeNode : TypeNode @@ -997,17 +1025,53 @@ declare module ts { >initializer : Expression >Expression : Expression } - interface ShortHandPropertyDeclaration extends Declaration { ->ShortHandPropertyDeclaration : ShortHandPropertyDeclaration + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableDeclaration : VariableDeclaration +>ParameterDeclaration : ParameterDeclaration + + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; +>VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>PropertyDeclaration : PropertyDeclaration + + interface ObjectLiteralElement extends Declaration { +>ObjectLiteralElement : ObjectLiteralElement >Declaration : Declaration + _objectLiteralBrandBrand: any; +>_objectLiteralBrandBrand : any + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { +>ShorthandPropertyAssignment : ShorthandPropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + name: Identifier; >name : Identifier >Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node } - interface ParameterDeclaration extends VariableDeclaration { ->ParameterDeclaration : ParameterDeclaration ->VariableDeclaration : VariableDeclaration + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression } /** * Several node kinds share function-like features such as a signature, @@ -1026,6 +1090,10 @@ declare module ts { asteriskToken?: Node; >asteriskToken : Node +>Node : Node + + questionToken?: Node; +>questionToken : Node >Node : Node body?: Block | Expression; @@ -1046,10 +1114,11 @@ declare module ts { >body : Block >Block : Block } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >MethodDeclaration : MethodDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement body?: Block; >body : Block @@ -1064,12 +1133,16 @@ declare module ts { >body : Block >Block : Block } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >AccessorDeclaration : AccessorDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement - body?: Block; + _accessorDeclarationBrand: any; +>_accessorDeclarationBrand : any + + body: Block; >body : Block >Block : Block } @@ -1084,6 +1157,17 @@ declare module ts { interface TypeNode extends Node { >TypeNode : TypeNode >Node : Node + + _typeNodeBrand: any; +>_typeNodeBrand : any + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { +>FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode +>TypeNode : TypeNode +>SignatureDeclaration : SignatureDeclaration + + _functionOrConstructorTypeNodeBrand: any; +>_functionOrConstructorTypeNodeBrand : any } interface TypeReferenceNode extends TypeNode { >TypeReferenceNode : TypeReferenceNode @@ -1149,13 +1233,6 @@ declare module ts { type: TypeNode; >type : TypeNode >TypeNode : TypeNode - } - interface StringLiteralTypeNode extends TypeNode { ->StringLiteralTypeNode : StringLiteralTypeNode ->TypeNode : TypeNode - - text: string; ->text : string } interface Expression extends Node { >Expression : Expression @@ -1315,6 +1392,16 @@ declare module ts { text: string; >text : string + + isUnterminated?: boolean; +>isUnterminated : boolean + } + interface StringLiteralExpression extends LiteralExpression { +>StringLiteralExpression : StringLiteralExpression +>LiteralExpression : LiteralExpression + + _stringLiteralExpressionBrand: any; +>_stringLiteralExpressionBrand : any } interface TemplateExpression extends PrimaryExpression { >TemplateExpression : TemplateExpression @@ -1363,10 +1450,10 @@ declare module ts { >PrimaryExpression : PrimaryExpression >Declaration : Declaration - properties: NodeArray; ->properties : NodeArray + properties: NodeArray; +>properties : NodeArray >NodeArray : NodeArray ->Declaration : Declaration +>ObjectLiteralElement : ObjectLiteralElement } interface PropertyAccessExpression extends MemberExpression { >PropertyAccessExpression : PropertyAccessExpression @@ -1388,7 +1475,7 @@ declare module ts { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression - argumentExpression: Expression; + argumentExpression?: Expression; >argumentExpression : Expression >Expression : Expression } @@ -1595,12 +1682,12 @@ declare module ts { >Expression : Expression clauses: NodeArray; ->clauses : NodeArray +>clauses : NodeArray >NodeArray : NodeArray ->CaseOrDefaultClause : CaseOrDefaultClause +>CaseOrDefaultClause : CaseClause | DefaultClause } - interface CaseOrDefaultClause extends Node { ->CaseOrDefaultClause : CaseOrDefaultClause + interface CaseClause extends Node { +>CaseClause : CaseClause >Node : Node expression?: Expression; @@ -1612,6 +1699,20 @@ declare module ts { >NodeArray : NodeArray >Statement : Statement } + interface DefaultClause extends Node { +>DefaultClause : DefaultClause +>Node : Node + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + type CaseOrDefaultClause = CaseClause | DefaultClause; +>CaseOrDefaultClause : CaseClause | DefaultClause +>CaseClause : CaseClause +>DefaultClause : DefaultClause + interface LabeledStatement extends Statement { >LabeledStatement : LabeledStatement >Statement : Statement @@ -1640,26 +1741,29 @@ declare module ts { >tryBlock : Block >Block : Block - catchBlock?: CatchBlock; ->catchBlock : CatchBlock ->CatchBlock : CatchBlock + catchClause?: CatchClause; +>catchClause : CatchClause +>CatchClause : CatchClause finallyBlock?: Block; >finallyBlock : Block >Block : Block } - interface CatchBlock extends Block, Declaration { ->CatchBlock : CatchBlock ->Block : Block + interface CatchClause extends Declaration { +>CatchClause : CatchClause >Declaration : Declaration - variable: Identifier; ->variable : Identifier + name: Identifier; +>name : Identifier >Identifier : Identifier type?: TypeNode; >type : TypeNode >TypeNode : TypeNode + + block: Block; +>block : Block +>Block : Block } interface ModuleElement extends Node { >ModuleElement : ModuleElement @@ -1809,13 +1913,18 @@ declare module ts { >name : Identifier >Identifier : Identifier - entityName?: EntityName; ->entityName : Identifier | QualifiedName + moduleReference: EntityName | ExternalModuleReference; +>moduleReference : Identifier | QualifiedName | ExternalModuleReference >EntityName : Identifier | QualifiedName +>ExternalModuleReference : ExternalModuleReference + } + interface ExternalModuleReference extends Node { +>ExternalModuleReference : ExternalModuleReference +>Node : Node - externalModuleName?: LiteralExpression; ->externalModuleName : LiteralExpression ->LiteralExpression : LiteralExpression + expression?: Expression; +>expression : Expression +>Expression : Expression } interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment @@ -1849,6 +1958,10 @@ declare module ts { >NodeArray : NodeArray >ModuleElement : ModuleElement + endOfFileToken: Node; +>endOfFileToken : Node +>Node : Node + filename: string; >filename : string @@ -1878,8 +1991,8 @@ declare module ts { >referencedFiles : FileReference[] >FileReference : FileReference - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] + referenceDiagnostics: Diagnostic[]; +>referenceDiagnostics : Diagnostic[] >Diagnostic : Diagnostic parseDiagnostics: Diagnostic[]; @@ -1892,6 +2005,10 @@ declare module ts { getSyntacticDiagnostics(): Diagnostic[]; >getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] >Diagnostic : Diagnostic hasNoDefaultLib: boolean; @@ -2085,23 +2202,14 @@ declare module ts { getTypeCount(): number; >getTypeCount : () => number - checkProgram(): void; ->checkProgram : () => void - emitFiles(targetSourceFile?: SourceFile): EmitResult; >emitFiles : (targetSourceFile?: SourceFile) => EmitResult >targetSourceFile : SourceFile >SourceFile : SourceFile >EmitResult : EmitResult - getParentOfSymbol(symbol: Symbol): Symbol; ->getParentOfSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; ->getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; +>getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type >symbol : Symbol >Symbol : Symbol >node : Node @@ -2157,8 +2265,8 @@ declare module ts { >SymbolFlags : SymbolFlags >Symbol : Symbol - getSymbolInfo(node: Node): Symbol; ->getSymbolInfo : (node: Node) => Symbol + getSymbolAtLocation(node: Node): Symbol; +>getSymbolAtLocation : (node: Node) => Symbol >node : Node >Node : Node >Symbol : Symbol @@ -2169,8 +2277,8 @@ declare module ts { >Node : Node >Symbol : Symbol - getTypeOfNode(node: Node): Type; ->getTypeOfNode : (node: Node) => Type + getTypeAtLocation(node: Node): Type; +>getTypeAtLocation : (node: Node) => Type >node : Node >Node : Node >Type : Type @@ -2214,10 +2322,10 @@ declare module ts { >Symbol : Symbol >Symbol : Symbol - getContextualType(node: Node): Type; ->getContextualType : (node: Node) => Type ->node : Node ->Node : Node + getContextualType(node: Expression): Type; +>getContextualType : (node: Expression) => Type +>node : Expression +>Expression : Expression >Type : Type getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; @@ -2550,8 +2658,10 @@ declare module ts { >node : EnumMember >EnumMember : EnumMember - hasSemanticErrors(): boolean; ->hasSemanticErrors : () => boolean + hasSemanticErrors(sourceFile?: SourceFile): boolean; +>hasSemanticErrors : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile isDeclarationVisible(node: Declaration): boolean; >isDeclarationVisible : (node: Declaration) => boolean @@ -2563,10 +2673,11 @@ declare module ts { >node : FunctionLikeDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->location : Node ->Node : Node + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration +>AccessorDeclaration : AccessorDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration >enclosingDeclaration : Node >Node : Node >flags : TypeFormatFlags @@ -3024,9 +3135,6 @@ declare module ts { ObjectType = 48128, >ObjectType : TypeFlags - - Structured = 65025, ->Structured : TypeFlags } interface Type { >Type : Type @@ -3358,14 +3466,6 @@ declare module ts { */ isEarly?: boolean; >isEarly : boolean - - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; ->isParseError : boolean } enum DiagnosticCategory { >DiagnosticCategory : DiagnosticCategory @@ -3456,6 +3556,9 @@ declare module ts { preserveConstEnums?: boolean; >preserveConstEnums : boolean + allowNonTsExtensions?: boolean; +>allowNonTsExtensions : boolean + [option: string]: string | number | boolean; >option : string } @@ -3924,8 +4027,10 @@ declare module ts { >message : string >SourceFile : SourceFile - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken @@ -4001,6 +4106,9 @@ declare module ts { isReservedWord(): boolean; >isReservedWord : () => boolean + isUnterminated(): boolean; +>isUnterminated : () => boolean + reScanGreaterToken(): SyntaxKind; >reScanGreaterToken : () => SyntaxKind >SyntaxKind : SyntaxKind @@ -4025,6 +4133,13 @@ declare module ts { >setTextPos : (textPos: number) => void >textPos : number + lookAhead(callback: () => T): T; +>lookAhead : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + tryScan(callback: () => T): T; >tryScan : (callback: () => T) => T >T : T @@ -4113,35 +4228,19 @@ declare module ts { >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget >skipTrivia : boolean >text : string >onError : ErrorCallback >ErrorCallback : ErrorCallback ->onComment : CommentCallback ->CommentCallback : CommentCallback >Scanner : Scanner } declare module ts { >ts : typeof ts - interface ReferencePathMatchResult { ->ReferencePathMatchResult : ReferencePathMatchResult - - fileReference?: FileReference; ->fileReference : FileReference ->FileReference : FileReference - - diagnostic?: DiagnosticMessage; ->diagnostic : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - isNoDefaultLib?: boolean; ->isNoDefaultLib : boolean - } function getNodeConstructor(kind: SyntaxKind): new () => Node; >getNodeConstructor : (kind: SyntaxKind) => new () => Node >kind : SyntaxKind @@ -4195,6 +4294,9 @@ declare module ts { declare module ts { >ts : typeof ts + var servicesVersion: string; +>servicesVersion : string + interface Node { >Node : Node @@ -4460,18 +4562,20 @@ declare module ts { >fileName : string >IScriptSnapshot : IScriptSnapshot - getLocalizedDiagnosticMessages(): any; + getLocalizedDiagnosticMessages?(): any; >getLocalizedDiagnosticMessages : () => any - getCancellationToken(): CancellationToken; + getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken >CancellationToken : CancellationToken getCurrentDirectory(): string; >getCurrentDirectory : () => string - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions } interface LanguageService { >LanguageService : LanguageService @@ -4507,11 +4611,10 @@ declare module ts { >TextSpan : TextSpan >ClassifiedSpan : ClassifiedSpan - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo >fileName : string >position : number ->isMemberCompletion : boolean >CompletionInfo : CompletionInfo getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; @@ -5573,12 +5676,10 @@ declare module ts { static typeParameterName: string; >typeParameterName : string - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart + static typeAlias: string; +>typeAlias : string + } interface DisplayPartsSymbolWriter extends SymbolWriter { >DisplayPartsSymbolWriter : DisplayPartsSymbolWriter >SymbolWriter : SymbolWriter @@ -5587,6 +5688,11 @@ declare module ts { >displayParts : () => SymbolDisplayPart[] >SymbolDisplayPart : SymbolDisplayPart } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + function getDefaultCompilerOptions(): CompilerOptions; >getDefaultCompilerOptions : () => CompilerOptions >CompilerOptions : CompilerOptions