Update LKG

This commit is contained in:
Cyrus Najmabadi 2015-03-07 13:59:18 -08:00
parent 21627384a8
commit 04d373ab9b
8 changed files with 8436 additions and 4405 deletions

2234
bin/tsc.js

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

129
bin/typescript.d.ts vendored
View file

@ -124,28 +124,28 @@ declare module "typescript" {
WhileKeyword = 99,
WithKeyword = 100,
AsKeyword = 101,
FromKeyword = 102,
ImplementsKeyword = 103,
InterfaceKeyword = 104,
LetKeyword = 105,
PackageKeyword = 106,
PrivateKeyword = 107,
ProtectedKeyword = 108,
PublicKeyword = 109,
StaticKeyword = 110,
YieldKeyword = 111,
AnyKeyword = 112,
BooleanKeyword = 113,
ConstructorKeyword = 114,
DeclareKeyword = 115,
GetKeyword = 116,
ModuleKeyword = 117,
RequireKeyword = 118,
NumberKeyword = 119,
SetKeyword = 120,
StringKeyword = 121,
SymbolKeyword = 122,
TypeKeyword = 123,
ImplementsKeyword = 102,
InterfaceKeyword = 103,
LetKeyword = 104,
PackageKeyword = 105,
PrivateKeyword = 106,
ProtectedKeyword = 107,
PublicKeyword = 108,
StaticKeyword = 109,
YieldKeyword = 110,
AnyKeyword = 111,
BooleanKeyword = 112,
ConstructorKeyword = 113,
DeclareKeyword = 114,
GetKeyword = 115,
ModuleKeyword = 116,
RequireKeyword = 117,
NumberKeyword = 118,
SetKeyword = 119,
StringKeyword = 120,
SymbolKeyword = 121,
TypeKeyword = 122,
FromKeyword = 123,
OfKeyword = 124,
QualifiedName = 125,
ComputedPropertyName = 126,
@ -251,8 +251,8 @@ declare module "typescript" {
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 124,
FirstFutureReservedWord = 103,
LastFutureReservedWord = 111,
FirstFutureReservedWord = 102,
LastFutureReservedWord = 110,
FirstTypeNode = 139,
LastTypeNode = 147,
FirstPunctuation = 14,
@ -276,15 +276,16 @@ declare module "typescript" {
Private = 32,
Protected = 64,
Static = 128,
MultiLine = 256,
Synthetic = 512,
DeclarationFile = 1024,
Let = 2048,
Const = 4096,
OctalLiteral = 8192,
Modifier = 243,
Default = 256,
MultiLine = 512,
Synthetic = 1024,
DeclarationFile = 2048,
Let = 4096,
Const = 8192,
OctalLiteral = 16384,
Modifier = 499,
AccessibilityModifier = 112,
BlockScoped = 6144,
BlockScoped = 12288,
}
const enum ParserContextFlags {
StrictMode = 1,
@ -412,7 +413,7 @@ declare module "typescript" {
body?: Block | Expression;
}
interface FunctionDeclaration extends FunctionLikeDeclaration, Statement {
name: Identifier;
name?: Identifier;
body?: Block;
}
interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
@ -505,7 +506,9 @@ declare module "typescript" {
}
interface ConditionalExpression extends Expression {
condition: Expression;
questionToken: Node;
whenTrue: Expression;
colonToken: Node;
whenFalse: Expression;
}
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration {
@ -515,6 +518,7 @@ declare module "typescript" {
interface LiteralExpression extends PrimaryExpression {
text: string;
isUnterminated?: boolean;
hasExtendedUnicodeEscape?: boolean;
}
interface StringLiteralExpression extends LiteralExpression {
_stringLiteralExpressionBrand: any;
@ -541,6 +545,7 @@ declare module "typescript" {
}
interface PropertyAccessExpression extends MemberExpression {
expression: LeftHandSideExpression;
dotToken: Node;
name: Identifier;
}
interface ElementAccessExpression extends MemberExpression {
@ -636,16 +641,15 @@ declare module "typescript" {
catchClause?: CatchClause;
finallyBlock?: Block;
}
interface CatchClause extends Declaration {
name: Identifier;
type?: TypeNode;
interface CatchClause extends Node {
variableDeclaration: VariableDeclaration;
block: Block;
}
interface ModuleElement extends Node {
_moduleElementBrand: any;
}
interface ClassDeclaration extends Declaration, ModuleElement {
name: Identifier;
name?: Identifier;
typeParameters?: NodeArray<TypeParameterDeclaration>;
heritageClauses?: NodeArray<HeritageClause>;
members: NodeArray<ClassElement>;
@ -675,10 +679,7 @@ declare module "typescript" {
name: Identifier;
members: NodeArray<EnumMember>;
}
interface ExportContainer {
exportStars?: ExportDeclaration[];
}
interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer {
interface ModuleDeclaration extends Declaration, ModuleElement {
name: Identifier | LiteralExpression;
body: ModuleBlock | ModuleDeclaration;
}
@ -703,7 +704,7 @@ declare module "typescript" {
interface NamespaceImport extends Declaration {
name: Identifier;
}
interface ExportDeclaration extends Statement, ModuleElement {
interface ExportDeclaration extends Declaration, ModuleElement {
exportClause?: NamedExports;
moduleSpecifier?: Expression;
}
@ -718,8 +719,9 @@ declare module "typescript" {
}
type ImportSpecifier = ImportOrExportSpecifier;
type ExportSpecifier = ImportOrExportSpecifier;
interface ExportAssignment extends Statement, ModuleElement {
exportName: Identifier;
interface ExportAssignment extends Declaration, ModuleElement {
isExportEquals?: boolean;
expression: Expression;
}
interface FileReference extends TextRange {
fileName: string;
@ -727,7 +729,7 @@ declare module "typescript" {
interface CommentRange extends TextRange {
hasTrailingNewLine?: boolean;
}
interface SourceFile extends Declaration, ExportContainer {
interface SourceFile extends Declaration {
statements: NodeArray<ModuleElement>;
endOfFileToken: Node;
fileName: string;
@ -832,6 +834,7 @@ declare module "typescript" {
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfExternalModule(node: ImportDeclaration): Symbol[];
}
interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@ -889,10 +892,10 @@ declare module "typescript" {
errorModuleName?: string;
}
interface EmitResolver {
getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string;
getGeneratedNameForNode(node: Node): string;
getExpressionNameSubstitution(node: Identifier): string;
getExportAssignmentName(node: SourceFile): string;
isReferencedImportDeclaration(node: Node): boolean;
hasExportDefaultValue(node: SourceFile): boolean;
isReferencedAliasDeclaration(node: Node): boolean;
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
getNodeCheckFlags(node: Node): NodeCheckFlags;
isDeclarationVisible(node: Declaration): boolean;
@ -903,6 +906,7 @@ declare module "typescript" {
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isUnknownIdentifier(location: Node, name: string): boolean;
getBlockScopedVariableId(node: Identifier): number;
}
const enum SymbolFlags {
FunctionScopedVariable = 1,
@ -928,13 +932,14 @@ declare module "typescript" {
ExportValue = 1048576,
ExportType = 2097152,
ExportNamespace = 4194304,
Import = 8388608,
Alias = 8388608,
Instantiated = 16777216,
Merged = 33554432,
Transient = 67108864,
Prototype = 134217728,
UnionProperty = 268435456,
Optional = 536870912,
ExportStar = 1073741824,
Enum = 384,
Variable = 3,
Value = 107455,
@ -959,7 +964,7 @@ declare module "typescript" {
SetAccessorExcludes = 74687,
TypeParameterExcludes = 530912,
TypeAliasExcludes = 793056,
ImportExcludes = 8388608,
AliasExcludes = 8388608,
ModuleMember = 8914931,
ExportHasLocal = 944,
HasLocals = 255504,
@ -988,10 +993,9 @@ declare module "typescript" {
declaredType?: Type;
mapper?: TypeMapper;
referenced?: boolean;
exportAssignmentChecked?: boolean;
exportAssignmentSymbol?: Symbol;
unionType?: UnionType;
resolvedExports?: SymbolTable;
exportsChecked?: boolean;
}
interface TransientSymbol extends Symbol, SymbolLinks {
}
@ -1007,6 +1011,7 @@ declare module "typescript" {
SuperStatic = 32,
ContextChecked = 64,
EnumValuesComputed = 128,
BlockScopedBindingInLoop = 256,
}
interface NodeLinks {
resolvedType?: Type;
@ -1383,6 +1388,7 @@ declare module "typescript" {
getTokenPos(): number;
getTokenText(): string;
getTokenValue(): string;
hasExtendedUnicodeEscape(): boolean;
hasPrecedingLineBreak(): boolean;
isIdentifier(): boolean;
isReservedWord(): boolean;
@ -1479,9 +1485,6 @@ declare module "typescript" {
getDocumentationComment(): SymbolDisplayPart[];
}
interface SourceFile {
version: string;
scriptSnapshot: IScriptSnapshot;
nameTable: Map<string>;
getNamedDeclarations(): Declaration[];
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
getLineStarts(): number[];
@ -1835,25 +1838,17 @@ declare module "typescript" {
acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile;
/**
* Request an updated version of an already existing SourceFile with a given fileName
* and compilationSettings. The update will intern call updateLanguageServiceSourceFile
* and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
* to get an updated SourceFile.
*
* Note: It is not allowed to call update on a SourceFile that was not acquired from this
* registry originally.
*
* @param sourceFile The original sourceFile object to update
* @param fileName The name of the file requested
* @param compilationSettings Some compilation settings like target affects the
* shape of a the resulting SourceFile. This allows the DocumentRegistry to store
* multiple copies of the same file for different compilation settings.
* @parm scriptSnapshot Text of the file. Only used if the file was not found
* in the registry and a new one was created.
* @parm version Current version of the file. Only used if the file was not found
* in the registry and a new one was created.
* @parm textChangeRange Change ranges since the last snapshot. Only used if the file
* was not found in the registry and a new one was created.
* @param scriptSnapshot Text of the file.
* @param version Current version of the file.
*/
updateDocument(sourceFile: SourceFile, fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile;
updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile;
/**
* Informs the DocumentRegistry that a file is not needed any longer.
*

File diff suppressed because it is too large Load diff

View file

@ -124,28 +124,28 @@ declare module ts {
WhileKeyword = 99,
WithKeyword = 100,
AsKeyword = 101,
FromKeyword = 102,
ImplementsKeyword = 103,
InterfaceKeyword = 104,
LetKeyword = 105,
PackageKeyword = 106,
PrivateKeyword = 107,
ProtectedKeyword = 108,
PublicKeyword = 109,
StaticKeyword = 110,
YieldKeyword = 111,
AnyKeyword = 112,
BooleanKeyword = 113,
ConstructorKeyword = 114,
DeclareKeyword = 115,
GetKeyword = 116,
ModuleKeyword = 117,
RequireKeyword = 118,
NumberKeyword = 119,
SetKeyword = 120,
StringKeyword = 121,
SymbolKeyword = 122,
TypeKeyword = 123,
ImplementsKeyword = 102,
InterfaceKeyword = 103,
LetKeyword = 104,
PackageKeyword = 105,
PrivateKeyword = 106,
ProtectedKeyword = 107,
PublicKeyword = 108,
StaticKeyword = 109,
YieldKeyword = 110,
AnyKeyword = 111,
BooleanKeyword = 112,
ConstructorKeyword = 113,
DeclareKeyword = 114,
GetKeyword = 115,
ModuleKeyword = 116,
RequireKeyword = 117,
NumberKeyword = 118,
SetKeyword = 119,
StringKeyword = 120,
SymbolKeyword = 121,
TypeKeyword = 122,
FromKeyword = 123,
OfKeyword = 124,
QualifiedName = 125,
ComputedPropertyName = 126,
@ -251,8 +251,8 @@ declare module ts {
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 124,
FirstFutureReservedWord = 103,
LastFutureReservedWord = 111,
FirstFutureReservedWord = 102,
LastFutureReservedWord = 110,
FirstTypeNode = 139,
LastTypeNode = 147,
FirstPunctuation = 14,
@ -276,15 +276,16 @@ declare module ts {
Private = 32,
Protected = 64,
Static = 128,
MultiLine = 256,
Synthetic = 512,
DeclarationFile = 1024,
Let = 2048,
Const = 4096,
OctalLiteral = 8192,
Modifier = 243,
Default = 256,
MultiLine = 512,
Synthetic = 1024,
DeclarationFile = 2048,
Let = 4096,
Const = 8192,
OctalLiteral = 16384,
Modifier = 499,
AccessibilityModifier = 112,
BlockScoped = 6144,
BlockScoped = 12288,
}
const enum ParserContextFlags {
StrictMode = 1,
@ -412,7 +413,7 @@ declare module ts {
body?: Block | Expression;
}
interface FunctionDeclaration extends FunctionLikeDeclaration, Statement {
name: Identifier;
name?: Identifier;
body?: Block;
}
interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
@ -505,7 +506,9 @@ declare module ts {
}
interface ConditionalExpression extends Expression {
condition: Expression;
questionToken: Node;
whenTrue: Expression;
colonToken: Node;
whenFalse: Expression;
}
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration {
@ -515,6 +518,7 @@ declare module ts {
interface LiteralExpression extends PrimaryExpression {
text: string;
isUnterminated?: boolean;
hasExtendedUnicodeEscape?: boolean;
}
interface StringLiteralExpression extends LiteralExpression {
_stringLiteralExpressionBrand: any;
@ -541,6 +545,7 @@ declare module ts {
}
interface PropertyAccessExpression extends MemberExpression {
expression: LeftHandSideExpression;
dotToken: Node;
name: Identifier;
}
interface ElementAccessExpression extends MemberExpression {
@ -636,16 +641,15 @@ declare module ts {
catchClause?: CatchClause;
finallyBlock?: Block;
}
interface CatchClause extends Declaration {
name: Identifier;
type?: TypeNode;
interface CatchClause extends Node {
variableDeclaration: VariableDeclaration;
block: Block;
}
interface ModuleElement extends Node {
_moduleElementBrand: any;
}
interface ClassDeclaration extends Declaration, ModuleElement {
name: Identifier;
name?: Identifier;
typeParameters?: NodeArray<TypeParameterDeclaration>;
heritageClauses?: NodeArray<HeritageClause>;
members: NodeArray<ClassElement>;
@ -675,10 +679,7 @@ declare module ts {
name: Identifier;
members: NodeArray<EnumMember>;
}
interface ExportContainer {
exportStars?: ExportDeclaration[];
}
interface ModuleDeclaration extends Declaration, ModuleElement, ExportContainer {
interface ModuleDeclaration extends Declaration, ModuleElement {
name: Identifier | LiteralExpression;
body: ModuleBlock | ModuleDeclaration;
}
@ -703,7 +704,7 @@ declare module ts {
interface NamespaceImport extends Declaration {
name: Identifier;
}
interface ExportDeclaration extends Statement, ModuleElement {
interface ExportDeclaration extends Declaration, ModuleElement {
exportClause?: NamedExports;
moduleSpecifier?: Expression;
}
@ -718,8 +719,9 @@ declare module ts {
}
type ImportSpecifier = ImportOrExportSpecifier;
type ExportSpecifier = ImportOrExportSpecifier;
interface ExportAssignment extends Statement, ModuleElement {
exportName: Identifier;
interface ExportAssignment extends Declaration, ModuleElement {
isExportEquals?: boolean;
expression: Expression;
}
interface FileReference extends TextRange {
fileName: string;
@ -727,7 +729,7 @@ declare module ts {
interface CommentRange extends TextRange {
hasTrailingNewLine?: boolean;
}
interface SourceFile extends Declaration, ExportContainer {
interface SourceFile extends Declaration {
statements: NodeArray<ModuleElement>;
endOfFileToken: Node;
fileName: string;
@ -832,6 +834,7 @@ declare module ts {
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfExternalModule(node: ImportDeclaration): Symbol[];
}
interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@ -889,10 +892,10 @@ declare module ts {
errorModuleName?: string;
}
interface EmitResolver {
getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration | ExportDeclaration): string;
getGeneratedNameForNode(node: Node): string;
getExpressionNameSubstitution(node: Identifier): string;
getExportAssignmentName(node: SourceFile): string;
isReferencedImportDeclaration(node: Node): boolean;
hasExportDefaultValue(node: SourceFile): boolean;
isReferencedAliasDeclaration(node: Node): boolean;
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
getNodeCheckFlags(node: Node): NodeCheckFlags;
isDeclarationVisible(node: Declaration): boolean;
@ -903,6 +906,7 @@ declare module ts {
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isUnknownIdentifier(location: Node, name: string): boolean;
getBlockScopedVariableId(node: Identifier): number;
}
const enum SymbolFlags {
FunctionScopedVariable = 1,
@ -928,13 +932,14 @@ declare module ts {
ExportValue = 1048576,
ExportType = 2097152,
ExportNamespace = 4194304,
Import = 8388608,
Alias = 8388608,
Instantiated = 16777216,
Merged = 33554432,
Transient = 67108864,
Prototype = 134217728,
UnionProperty = 268435456,
Optional = 536870912,
ExportStar = 1073741824,
Enum = 384,
Variable = 3,
Value = 107455,
@ -959,7 +964,7 @@ declare module ts {
SetAccessorExcludes = 74687,
TypeParameterExcludes = 530912,
TypeAliasExcludes = 793056,
ImportExcludes = 8388608,
AliasExcludes = 8388608,
ModuleMember = 8914931,
ExportHasLocal = 944,
HasLocals = 255504,
@ -988,10 +993,9 @@ declare module ts {
declaredType?: Type;
mapper?: TypeMapper;
referenced?: boolean;
exportAssignmentChecked?: boolean;
exportAssignmentSymbol?: Symbol;
unionType?: UnionType;
resolvedExports?: SymbolTable;
exportsChecked?: boolean;
}
interface TransientSymbol extends Symbol, SymbolLinks {
}
@ -1007,6 +1011,7 @@ declare module ts {
SuperStatic = 32,
ContextChecked = 64,
EnumValuesComputed = 128,
BlockScopedBindingInLoop = 256,
}
interface NodeLinks {
resolvedType?: Type;
@ -1383,6 +1388,7 @@ declare module ts {
getTokenPos(): number;
getTokenText(): string;
getTokenValue(): string;
hasExtendedUnicodeEscape(): boolean;
hasPrecedingLineBreak(): boolean;
isIdentifier(): boolean;
isReservedWord(): boolean;
@ -1479,9 +1485,6 @@ declare module ts {
getDocumentationComment(): SymbolDisplayPart[];
}
interface SourceFile {
version: string;
scriptSnapshot: IScriptSnapshot;
nameTable: Map<string>;
getNamedDeclarations(): Declaration[];
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
getLineStarts(): number[];
@ -1835,25 +1838,17 @@ declare module ts {
acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile;
/**
* Request an updated version of an already existing SourceFile with a given fileName
* and compilationSettings. The update will intern call updateLanguageServiceSourceFile
* and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
* to get an updated SourceFile.
*
* Note: It is not allowed to call update on a SourceFile that was not acquired from this
* registry originally.
*
* @param sourceFile The original sourceFile object to update
* @param fileName The name of the file requested
* @param compilationSettings Some compilation settings like target affects the
* shape of a the resulting SourceFile. This allows the DocumentRegistry to store
* multiple copies of the same file for different compilation settings.
* @parm scriptSnapshot Text of the file. Only used if the file was not found
* in the registry and a new one was created.
* @parm version Current version of the file. Only used if the file was not found
* in the registry and a new one was created.
* @parm textChangeRange Change ranges since the last snapshot. Only used if the file
* was not found in the registry and a new one was created.
* @param scriptSnapshot Text of the file.
* @param version Current version of the file.
*/
updateDocument(sourceFile: SourceFile, fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile;
updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile;
/**
* Informs the DocumentRegistry that a file is not needed any longer.
*

File diff suppressed because it is too large Load diff

View file

@ -87,12 +87,6 @@ declare module ts {
function combinePaths(path1: string, path2: string): string;
function fileExtensionIs(path: string, extension: string): boolean;
function removeFileExtension(path: string): string;
/**
* Based heavily on the abstract 'Quote' operation from ECMA-262 (24.3.2.2),
* but augmented for a few select characters.
* Note that this doesn't actually wrap the input in double quotes.
*/
function escapeString(s: string): string;
function getDefaultLibFileName(options: CompilerOptions): string;
interface ObjectAllocator {
getNodeConstructor(kind: SyntaxKind): new () => Node;
@ -143,6 +137,11 @@ declare module ts {
diagnosticMessage?: DiagnosticMessage;
isNoDefaultLib?: boolean;
}
interface SynthesizedNode extends Node {
leadingCommentRanges?: CommentRange[];
trailingCommentRanges?: CommentRange[];
startsOnNewLine: boolean;
}
function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration;
interface StringSymbolWriter extends SymbolWriter {
string(): string;
@ -171,10 +170,12 @@ declare module ts {
function escapeIdentifier(identifier: string): string;
function unescapeIdentifier(identifier: string): string;
function makeIdentifierFromModuleName(moduleName: string): string;
function isBlockOrCatchScoped(declaration: Declaration): boolean;
function isCatchClauseVariableDeclaration(declaration: Declaration): boolean;
function declarationNameToString(name: DeclarationName): string;
function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic;
function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain): Diagnostic;
function getErrorSpanForNode(node: Node): Node;
function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan;
function isExternalModule(file: SourceFile): boolean;
function isDeclarationFile(file: SourceFile): boolean;
function isConstEnumDeclaration(node: Node): boolean;
@ -186,7 +187,7 @@ declare module ts {
function getJsDocComments(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
var fullTripleSlashReferencePathRegEx: RegExp;
function forEachReturnStatement<T>(body: Block, visitor: (stmt: ReturnStatement) => T): T;
function isAnyFunction(node: Node): boolean;
function isFunctionLike(node: Node): boolean;
function isFunctionBlock(node: Node): boolean;
function isObjectLiteralMethod(node: Node): boolean;
function getContainingFunction(node: Node): FunctionLikeDeclaration;
@ -209,7 +210,7 @@ declare module ts {
function isInAmbientContext(node: Node): boolean;
function isDeclaration(node: Node): boolean;
function isStatement(n: Node): boolean;
function isDeclarationOrFunctionExpressionOrCatchVariableName(name: Node): boolean;
function isDeclarationName(name: Node): boolean;
function getClassBaseTypeNode(node: ClassDeclaration): TypeReferenceNode;
function getClassImplementedTypeNodes(node: ClassDeclaration): NodeArray<TypeReferenceNode>;
function getInterfaceBaseTypeNodes(node: InterfaceDeclaration): NodeArray<TypeReferenceNode>;
@ -265,6 +266,18 @@ declare module ts {
* Vn.
*/
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
function nodeStartsNewLexicalEnvironment(n: Node): boolean;
function nodeIsSynthesized(node: Node): boolean;
function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node;
function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string;
function createDiagnosticCollection(): DiagnosticCollection;
/**
* Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2),
* but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine)
* Note that this doesn't actually wrap the input in double quotes.
*/
function escapeString(s: string): string;
function escapeNonAsciiCharacters(s: string): string;
}
declare module ts {
var optionDeclarations: CommandLineOption[];

View file

@ -87,12 +87,6 @@ declare module "typescript" {
function combinePaths(path1: string, path2: string): string;
function fileExtensionIs(path: string, extension: string): boolean;
function removeFileExtension(path: string): string;
/**
* Based heavily on the abstract 'Quote' operation from ECMA-262 (24.3.2.2),
* but augmented for a few select characters.
* Note that this doesn't actually wrap the input in double quotes.
*/
function escapeString(s: string): string;
function getDefaultLibFileName(options: CompilerOptions): string;
interface ObjectAllocator {
getNodeConstructor(kind: SyntaxKind): new () => Node;
@ -143,6 +137,11 @@ declare module "typescript" {
diagnosticMessage?: DiagnosticMessage;
isNoDefaultLib?: boolean;
}
interface SynthesizedNode extends Node {
leadingCommentRanges?: CommentRange[];
trailingCommentRanges?: CommentRange[];
startsOnNewLine: boolean;
}
function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration;
interface StringSymbolWriter extends SymbolWriter {
string(): string;
@ -171,10 +170,12 @@ declare module "typescript" {
function escapeIdentifier(identifier: string): string;
function unescapeIdentifier(identifier: string): string;
function makeIdentifierFromModuleName(moduleName: string): string;
function isBlockOrCatchScoped(declaration: Declaration): boolean;
function isCatchClauseVariableDeclaration(declaration: Declaration): boolean;
function declarationNameToString(name: DeclarationName): string;
function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic;
function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain): Diagnostic;
function getErrorSpanForNode(node: Node): Node;
function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan;
function isExternalModule(file: SourceFile): boolean;
function isDeclarationFile(file: SourceFile): boolean;
function isConstEnumDeclaration(node: Node): boolean;
@ -186,7 +187,7 @@ declare module "typescript" {
function getJsDocComments(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
var fullTripleSlashReferencePathRegEx: RegExp;
function forEachReturnStatement<T>(body: Block, visitor: (stmt: ReturnStatement) => T): T;
function isAnyFunction(node: Node): boolean;
function isFunctionLike(node: Node): boolean;
function isFunctionBlock(node: Node): boolean;
function isObjectLiteralMethod(node: Node): boolean;
function getContainingFunction(node: Node): FunctionLikeDeclaration;
@ -209,7 +210,7 @@ declare module "typescript" {
function isInAmbientContext(node: Node): boolean;
function isDeclaration(node: Node): boolean;
function isStatement(n: Node): boolean;
function isDeclarationOrFunctionExpressionOrCatchVariableName(name: Node): boolean;
function isDeclarationName(name: Node): boolean;
function getClassBaseTypeNode(node: ClassDeclaration): TypeReferenceNode;
function getClassImplementedTypeNodes(node: ClassDeclaration): NodeArray<TypeReferenceNode>;
function getInterfaceBaseTypeNodes(node: InterfaceDeclaration): NodeArray<TypeReferenceNode>;
@ -265,6 +266,18 @@ declare module "typescript" {
* Vn.
*/
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
function nodeStartsNewLexicalEnvironment(n: Node): boolean;
function nodeIsSynthesized(node: Node): boolean;
function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node;
function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string;
function createDiagnosticCollection(): DiagnosticCollection;
/**
* Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2),
* but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine)
* Note that this doesn't actually wrap the input in double quotes.
*/
function escapeString(s: string): string;
function escapeNonAsciiCharacters(s: string): string;
}
declare module "typescript" {
var optionDeclarations: CommandLineOption[];