mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update LKG
This commit is contained in:
1 parent
efe2c56b5e
commit
83994e151b
14 files changed
+18079
-13955
No files matched your search
Vendored
+29
-1
@@ -200,7 +200,7 @@ interface ObjectConstructor {
|
||||
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
||||
* @param o Object on which to lock the attributes.
|
||||
*/
|
||||
freeze<T>(o: T): T;
|
||||
freeze<T>(o: T): Readonly<T>;
|
||||
|
||||
/**
|
||||
* Prevents the addition of new properties to an object.
|
||||
@@ -1363,6 +1363,34 @@ interface ArrayLike<T> {
|
||||
readonly [n: number]: T;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make all properties in T optional
|
||||
*/
|
||||
type Partial<T> = {
|
||||
[P in keyof T]?: T[P];
|
||||
};
|
||||
|
||||
/**
|
||||
* Make all properties in T readonly
|
||||
*/
|
||||
type Readonly<T> = {
|
||||
readonly [P in keyof T]: T[P];
|
||||
};
|
||||
|
||||
/**
|
||||
* From T pick a set of properties K
|
||||
*/
|
||||
type Pick<T, K extends keyof T> = {
|
||||
[P in K]: T[P];
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a type with a set of properties K of type T
|
||||
*/
|
||||
type Record<K extends string | number, T> = {
|
||||
[P in K]: T;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a raw buffer of binary data, which is used to store data for the
|
||||
* different typed arrays. ArrayBuffers cannot be read from or written to directly,
|
||||
|
||||
Vendored
+4
-4
@@ -225,13 +225,13 @@ interface NumberConstructor {
|
||||
* number. Only finite values of the type number, result in true.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isFinite(value: any): value is number;
|
||||
isFinite(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the value passed is an integer, false otherwise.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isInteger(value: any): value is number;
|
||||
isInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
|
||||
@@ -239,13 +239,13 @@ interface NumberConstructor {
|
||||
* to a number. Only values of the type number, that are also NaN, result in true.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isNaN(value: any): value is number;
|
||||
isNaN(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the value passed is a safe integer.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isSafeInteger(value: any): value is number;
|
||||
isSafeInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* The value of the largest integer n such that n and n + 1 are both exactly representable as
|
||||
|
||||
Vendored
+29
-1
@@ -200,7 +200,7 @@ interface ObjectConstructor {
|
||||
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
||||
* @param o Object on which to lock the attributes.
|
||||
*/
|
||||
freeze<T>(o: T): T;
|
||||
freeze<T>(o: T): Readonly<T>;
|
||||
|
||||
/**
|
||||
* Prevents the addition of new properties to an object.
|
||||
@@ -1363,6 +1363,34 @@ interface ArrayLike<T> {
|
||||
readonly [n: number]: T;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make all properties in T optional
|
||||
*/
|
||||
type Partial<T> = {
|
||||
[P in keyof T]?: T[P];
|
||||
};
|
||||
|
||||
/**
|
||||
* Make all properties in T readonly
|
||||
*/
|
||||
type Readonly<T> = {
|
||||
readonly [P in keyof T]: T[P];
|
||||
};
|
||||
|
||||
/**
|
||||
* From T pick a set of properties K
|
||||
*/
|
||||
type Pick<T, K extends keyof T> = {
|
||||
[P in K]: T[P];
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a type with a set of properties K of type T
|
||||
*/
|
||||
type Record<K extends string | number, T> = {
|
||||
[P in K]: T;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a raw buffer of binary data, which is used to store data for the
|
||||
* different typed arrays. ArrayBuffers cannot be read from or written to directly,
|
||||
|
||||
Vendored
+33
-5
@@ -200,7 +200,7 @@ interface ObjectConstructor {
|
||||
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
||||
* @param o Object on which to lock the attributes.
|
||||
*/
|
||||
freeze<T>(o: T): T;
|
||||
freeze<T>(o: T): Readonly<T>;
|
||||
|
||||
/**
|
||||
* Prevents the addition of new properties to an object.
|
||||
@@ -1363,6 +1363,34 @@ interface ArrayLike<T> {
|
||||
readonly [n: number]: T;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make all properties in T optional
|
||||
*/
|
||||
type Partial<T> = {
|
||||
[P in keyof T]?: T[P];
|
||||
};
|
||||
|
||||
/**
|
||||
* Make all properties in T readonly
|
||||
*/
|
||||
type Readonly<T> = {
|
||||
readonly [P in keyof T]: T[P];
|
||||
};
|
||||
|
||||
/**
|
||||
* From T pick a set of properties K
|
||||
*/
|
||||
type Pick<T, K extends keyof T> = {
|
||||
[P in K]: T[P];
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a type with a set of properties K of type T
|
||||
*/
|
||||
type Record<K extends string | number, T> = {
|
||||
[P in K]: T;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a raw buffer of binary data, which is used to store data for the
|
||||
* different typed arrays. ArrayBuffers cannot be read from or written to directly,
|
||||
@@ -4362,13 +4390,13 @@ interface NumberConstructor {
|
||||
* number. Only finite values of the type number, result in true.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isFinite(value: any): value is number;
|
||||
isFinite(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the value passed is an integer, false otherwise.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isInteger(value: any): value is number;
|
||||
isInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
|
||||
@@ -4376,13 +4404,13 @@ interface NumberConstructor {
|
||||
* to a number. Only values of the type number, that are also NaN, result in true.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isNaN(value: any): value is number;
|
||||
isNaN(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the value passed is a safe integer.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isSafeInteger(value: any): value is number;
|
||||
isSafeInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* The value of the largest integer n such that n and n + 1 are both exactly representable as
|
||||
|
||||
Vendored
+23
@@ -1400,6 +1400,25 @@ declare namespace ts.server.protocol {
|
||||
body?: ConfigFileDiagnosticEventBody;
|
||||
event: "configFileDiag";
|
||||
}
|
||||
type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
|
||||
interface ProjectLanguageServiceStateEvent extends Event {
|
||||
event: ProjectLanguageServiceStateEventName;
|
||||
body?: ProjectLanguageServiceStateEventBody;
|
||||
}
|
||||
interface ProjectLanguageServiceStateEventBody {
|
||||
/**
|
||||
* Project name that has changes in the state of language service.
|
||||
* For configured projects this will be the config file path.
|
||||
* For external projects this will be the name of the projects specified when project was open.
|
||||
* For inferred projects this event is not raised.
|
||||
*/
|
||||
projectName: string;
|
||||
/**
|
||||
* True if language service state switched from disabled to enabled
|
||||
* and false otherwise.
|
||||
*/
|
||||
languageServiceEnabled: boolean;
|
||||
}
|
||||
/**
|
||||
* Arguments for reload request.
|
||||
*/
|
||||
@@ -1634,6 +1653,10 @@ declare namespace ts.server.protocol {
|
||||
* true if install request succeeded, otherwise - false
|
||||
*/
|
||||
installSuccess: boolean;
|
||||
/**
|
||||
* version of typings installer
|
||||
*/
|
||||
typingsInstallerVersion: string;
|
||||
}
|
||||
interface NavBarResponse extends Response {
|
||||
body?: NavigationBarItem[];
|
||||
|
||||
+2846
-2428
File diff suppressed because it is too large.
Load diff
+3039
-2527
File diff suppressed because it is too large.
Load diff
Vendored
+302
-194
@@ -614,6 +614,15 @@ declare namespace ts.server.protocol {
|
||||
body?: ConfigFileDiagnosticEventBody;
|
||||
event: "configFileDiag";
|
||||
}
|
||||
type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
|
||||
interface ProjectLanguageServiceStateEvent extends Event {
|
||||
event: ProjectLanguageServiceStateEventName;
|
||||
body?: ProjectLanguageServiceStateEventBody;
|
||||
}
|
||||
interface ProjectLanguageServiceStateEventBody {
|
||||
projectName: string;
|
||||
languageServiceEnabled: boolean;
|
||||
}
|
||||
interface ReloadRequestArgs extends FileRequestArgs {
|
||||
tmpfile: string;
|
||||
}
|
||||
@@ -706,6 +715,7 @@ declare namespace ts.server.protocol {
|
||||
interface TypingsInstalledTelemetryEventPayload {
|
||||
installedPackages: string;
|
||||
installSuccess: boolean;
|
||||
typingsInstallerVersion: string;
|
||||
}
|
||||
interface NavBarResponse extends Response {
|
||||
body?: NavigationBarItem[];
|
||||
@@ -1155,7 +1165,8 @@ declare namespace ts {
|
||||
PartiallyEmittedExpression = 293,
|
||||
MergeDeclarationMarker = 294,
|
||||
EndOfDeclarationMarker = 295,
|
||||
Count = 296,
|
||||
RawExpression = 296,
|
||||
Count = 297,
|
||||
FirstAssignment = 57,
|
||||
LastAssignment = 69,
|
||||
FirstCompoundAssignment = 58,
|
||||
@@ -1271,6 +1282,7 @@ declare namespace ts {
|
||||
}
|
||||
interface NodeArray<T extends Node> extends Array<T>, TextRange {
|
||||
hasTrailingComma?: boolean;
|
||||
transformFlags?: TransformFlags;
|
||||
}
|
||||
interface Token<TKind extends SyntaxKind> extends Node {
|
||||
kind: TKind;
|
||||
@@ -1313,14 +1325,14 @@ declare namespace ts {
|
||||
right: Identifier;
|
||||
}
|
||||
type EntityName = Identifier | QualifiedName;
|
||||
type PropertyName = Identifier | LiteralExpression | ComputedPropertyName;
|
||||
type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern;
|
||||
type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName;
|
||||
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
|
||||
interface Declaration extends Node {
|
||||
_declarationBrand: any;
|
||||
name?: DeclarationName;
|
||||
}
|
||||
interface DeclarationStatement extends Declaration, Statement {
|
||||
name?: Identifier | LiteralExpression;
|
||||
name?: Identifier | StringLiteral | NumericLiteral;
|
||||
}
|
||||
interface ComputedPropertyName extends Node {
|
||||
kind: SyntaxKind.ComputedPropertyName;
|
||||
@@ -1422,18 +1434,16 @@ declare namespace ts {
|
||||
interface PropertyLikeDeclaration extends Declaration {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface BindingPattern extends Node {
|
||||
elements: NodeArray<BindingElement | ArrayBindingElement>;
|
||||
}
|
||||
interface ObjectBindingPattern extends BindingPattern {
|
||||
interface ObjectBindingPattern extends Node {
|
||||
kind: SyntaxKind.ObjectBindingPattern;
|
||||
elements: NodeArray<BindingElement>;
|
||||
}
|
||||
type ArrayBindingElement = BindingElement | OmittedExpression;
|
||||
interface ArrayBindingPattern extends BindingPattern {
|
||||
interface ArrayBindingPattern extends Node {
|
||||
kind: SyntaxKind.ArrayBindingPattern;
|
||||
elements: NodeArray<ArrayBindingElement>;
|
||||
}
|
||||
type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
|
||||
type ArrayBindingElement = BindingElement | OmittedExpression;
|
||||
interface FunctionLikeDeclaration extends SignatureDeclaration {
|
||||
_functionLikeDeclarationBrand: any;
|
||||
asteriskToken?: AsteriskToken;
|
||||
@@ -1556,7 +1566,7 @@ declare namespace ts {
|
||||
}
|
||||
interface StringLiteral extends LiteralExpression {
|
||||
kind: SyntaxKind.StringLiteral;
|
||||
textSourceNode?: Identifier | StringLiteral;
|
||||
textSourceNode?: Identifier | StringLiteral | NumericLiteral;
|
||||
}
|
||||
interface Expression extends Node {
|
||||
_expressionBrand: any;
|
||||
@@ -1655,17 +1665,25 @@ declare namespace ts {
|
||||
operatorToken: BinaryOperatorToken;
|
||||
right: Expression;
|
||||
}
|
||||
interface AssignmentExpression extends BinaryExpression {
|
||||
type AssignmentOperatorToken = Token<AssignmentOperator>;
|
||||
interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
|
||||
left: LeftHandSideExpression;
|
||||
operatorToken: Token<SyntaxKind.EqualsToken>;
|
||||
operatorToken: TOperator;
|
||||
}
|
||||
interface ObjectDestructuringAssignment extends AssignmentExpression {
|
||||
interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
|
||||
left: ObjectLiteralExpression;
|
||||
}
|
||||
interface ArrayDestructuringAssignment extends AssignmentExpression {
|
||||
interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
|
||||
left: ArrayLiteralExpression;
|
||||
}
|
||||
type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
|
||||
type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
|
||||
type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
|
||||
type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Expression;
|
||||
type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
|
||||
type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
|
||||
type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
|
||||
type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
|
||||
interface ConditionalExpression extends Expression {
|
||||
kind: SyntaxKind.ConditionalExpression;
|
||||
condition: Expression;
|
||||
@@ -1858,6 +1876,10 @@ declare namespace ts {
|
||||
interface EndOfDeclarationMarker extends Statement {
|
||||
kind: SyntaxKind.EndOfDeclarationMarker;
|
||||
}
|
||||
interface RawExpression extends PrimaryExpression {
|
||||
kind: SyntaxKind.RawExpression;
|
||||
text: string;
|
||||
}
|
||||
interface MergeDeclarationMarker extends Statement {
|
||||
kind: SyntaxKind.MergeDeclarationMarker;
|
||||
}
|
||||
@@ -1885,6 +1907,9 @@ declare namespace ts {
|
||||
kind: SyntaxKind.ExpressionStatement;
|
||||
expression: Expression;
|
||||
}
|
||||
interface PrologueDirective extends ExpressionStatement {
|
||||
expression: StringLiteral;
|
||||
}
|
||||
interface IfStatement extends Statement {
|
||||
kind: SyntaxKind.IfStatement;
|
||||
expression: Expression;
|
||||
@@ -2032,7 +2057,7 @@ declare namespace ts {
|
||||
type ModuleName = Identifier | StringLiteral;
|
||||
interface ModuleDeclaration extends DeclarationStatement {
|
||||
kind: SyntaxKind.ModuleDeclaration;
|
||||
name: Identifier | LiteralExpression;
|
||||
name: Identifier | StringLiteral;
|
||||
body?: ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | Identifier;
|
||||
}
|
||||
interface NamespaceDeclaration extends ModuleDeclaration {
|
||||
@@ -2184,7 +2209,7 @@ declare namespace ts {
|
||||
type JSDocTypeReferencingNode = JSDocThisType | JSDocConstructorType | JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
|
||||
interface JSDocRecordMember extends PropertySignature {
|
||||
kind: SyntaxKind.JSDocRecordMember;
|
||||
name: Identifier | LiteralExpression;
|
||||
name: Identifier | StringLiteral | NumericLiteral;
|
||||
type?: JSDocType;
|
||||
}
|
||||
interface JSDoc extends Node {
|
||||
@@ -2323,7 +2348,6 @@ declare namespace ts {
|
||||
moduleAugmentations: LiteralExpression[];
|
||||
patternAmbientModules?: PatternAmbientModule[];
|
||||
ambientModuleNames: string[];
|
||||
externalHelpersModuleName?: Identifier;
|
||||
}
|
||||
interface ScriptReferenceHost {
|
||||
getCompilerOptions(): CompilerOptions;
|
||||
@@ -2444,6 +2468,7 @@ declare namespace ts {
|
||||
getJsxIntrinsicTagNames(): Symbol[];
|
||||
isOptionalParameter(node: ParameterDeclaration): boolean;
|
||||
getAmbientModules(): Symbol[];
|
||||
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
|
||||
tryFindAmbientModuleWithoutAugmentations(moduleName: string): Symbol;
|
||||
getDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
|
||||
getGlobalDiagnostics(): Diagnostic[];
|
||||
@@ -3345,95 +3370,100 @@ declare namespace ts {
|
||||
None = 0,
|
||||
TypeScript = 1,
|
||||
ContainsTypeScript = 2,
|
||||
Jsx = 4,
|
||||
ContainsJsx = 8,
|
||||
ESNext = 16,
|
||||
ContainsESNext = 32,
|
||||
ES2017 = 64,
|
||||
ContainsES2017 = 128,
|
||||
ES2016 = 256,
|
||||
ContainsES2016 = 512,
|
||||
ES2015 = 1024,
|
||||
ContainsES2015 = 2048,
|
||||
Generator = 4096,
|
||||
ContainsGenerator = 8192,
|
||||
DestructuringAssignment = 16384,
|
||||
ContainsDestructuringAssignment = 32768,
|
||||
ContainsDecorators = 65536,
|
||||
ContainsPropertyInitializer = 131072,
|
||||
ContainsLexicalThis = 262144,
|
||||
ContainsCapturedLexicalThis = 524288,
|
||||
ContainsLexicalThisInComputedPropertyName = 1048576,
|
||||
ContainsDefaultValueAssignments = 2097152,
|
||||
ContainsParameterPropertyAssignments = 4194304,
|
||||
ContainsSpreadExpression = 8388608,
|
||||
ContainsComputedPropertyName = 16777216,
|
||||
ContainsBlockScopedBinding = 33554432,
|
||||
ContainsBindingPattern = 67108864,
|
||||
ContainsYield = 134217728,
|
||||
ContainsHoistedDeclarationOrCompletion = 268435456,
|
||||
ContainsJsx = 4,
|
||||
ContainsESNext = 8,
|
||||
ContainsES2017 = 16,
|
||||
ContainsES2016 = 32,
|
||||
ES2015 = 64,
|
||||
ContainsES2015 = 128,
|
||||
Generator = 256,
|
||||
ContainsGenerator = 512,
|
||||
DestructuringAssignment = 1024,
|
||||
ContainsDestructuringAssignment = 2048,
|
||||
ContainsDecorators = 4096,
|
||||
ContainsPropertyInitializer = 8192,
|
||||
ContainsLexicalThis = 16384,
|
||||
ContainsCapturedLexicalThis = 32768,
|
||||
ContainsLexicalThisInComputedPropertyName = 65536,
|
||||
ContainsDefaultValueAssignments = 131072,
|
||||
ContainsParameterPropertyAssignments = 262144,
|
||||
ContainsSpread = 524288,
|
||||
ContainsObjectSpread = 1048576,
|
||||
ContainsRest = 524288,
|
||||
ContainsObjectRest = 1048576,
|
||||
ContainsComputedPropertyName = 2097152,
|
||||
ContainsBlockScopedBinding = 4194304,
|
||||
ContainsBindingPattern = 8388608,
|
||||
ContainsYield = 16777216,
|
||||
ContainsHoistedDeclarationOrCompletion = 33554432,
|
||||
HasComputedFlags = 536870912,
|
||||
AssertTypeScript = 3,
|
||||
AssertJsx = 12,
|
||||
AssertESNext = 48,
|
||||
AssertES2017 = 192,
|
||||
AssertES2016 = 768,
|
||||
AssertES2015 = 3072,
|
||||
AssertGenerator = 12288,
|
||||
AssertDestructuringAssignment = 49152,
|
||||
NodeExcludes = 536892757,
|
||||
ArrowFunctionExcludes = 979719509,
|
||||
FunctionExcludes = 980243797,
|
||||
ConstructorExcludes = 975983957,
|
||||
MethodOrAccessorExcludes = 975983957,
|
||||
ClassExcludes = 559895893,
|
||||
ModuleExcludes = 839734613,
|
||||
AssertJsx = 4,
|
||||
AssertESNext = 8,
|
||||
AssertES2017 = 16,
|
||||
AssertES2016 = 32,
|
||||
AssertES2015 = 192,
|
||||
AssertGenerator = 768,
|
||||
AssertDestructuringAssignment = 3072,
|
||||
NodeExcludes = 536872257,
|
||||
ArrowFunctionExcludes = 601249089,
|
||||
FunctionExcludes = 601281857,
|
||||
ConstructorExcludes = 601015617,
|
||||
MethodOrAccessorExcludes = 601015617,
|
||||
ClassExcludes = 539358529,
|
||||
ModuleExcludes = 574674241,
|
||||
TypeExcludes = -3,
|
||||
ObjectLiteralExcludes = 554784085,
|
||||
ArrayLiteralOrCallOrNewExcludes = 545281365,
|
||||
VariableDeclarationListExcludes = 604001621,
|
||||
ParameterExcludes = 604001621,
|
||||
TypeScriptClassSyntaxMask = 4390912,
|
||||
ES2015FunctionSyntaxMask = 2621440,
|
||||
ObjectLiteralExcludes = 540087617,
|
||||
ArrayLiteralOrCallOrNewExcludes = 537396545,
|
||||
VariableDeclarationListExcludes = 546309441,
|
||||
ParameterExcludes = 536872257,
|
||||
CatchClauseExcludes = 537920833,
|
||||
BindingPatternExcludes = 537396545,
|
||||
TypeScriptClassSyntaxMask = 274432,
|
||||
ES2015FunctionSyntaxMask = 163840,
|
||||
}
|
||||
interface EmitNode {
|
||||
annotatedNodes?: Node[];
|
||||
flags?: EmitFlags;
|
||||
commentRange?: TextRange;
|
||||
sourceMapRange?: TextRange;
|
||||
tokenSourceMapRanges?: Map<TextRange>;
|
||||
annotatedNodes?: Node[];
|
||||
constantValue?: number;
|
||||
externalHelpersModuleName?: Identifier;
|
||||
helpers?: EmitHelper[];
|
||||
}
|
||||
const enum EmitFlags {
|
||||
EmitEmitHelpers = 1,
|
||||
EmitExportStar = 2,
|
||||
EmitSuperHelper = 4,
|
||||
EmitAdvancedSuperHelper = 8,
|
||||
UMDDefine = 16,
|
||||
SingleLine = 32,
|
||||
AdviseOnEmitNode = 64,
|
||||
NoSubstitution = 128,
|
||||
CapturesThis = 256,
|
||||
NoLeadingSourceMap = 512,
|
||||
NoTrailingSourceMap = 1024,
|
||||
NoSourceMap = 1536,
|
||||
NoNestedSourceMaps = 2048,
|
||||
NoTokenLeadingSourceMaps = 4096,
|
||||
NoTokenTrailingSourceMaps = 8192,
|
||||
NoTokenSourceMaps = 12288,
|
||||
NoLeadingComments = 16384,
|
||||
NoTrailingComments = 32768,
|
||||
NoComments = 49152,
|
||||
NoNestedComments = 65536,
|
||||
ExportName = 131072,
|
||||
LocalName = 262144,
|
||||
Indented = 524288,
|
||||
NoIndentation = 1048576,
|
||||
AsyncFunctionBody = 2097152,
|
||||
ReuseTempVariableScope = 4194304,
|
||||
CustomPrologue = 8388608,
|
||||
NoHoisting = 16777216,
|
||||
HasEndOfDeclarationMarker = 33554432,
|
||||
SingleLine = 1,
|
||||
AdviseOnEmitNode = 2,
|
||||
NoSubstitution = 4,
|
||||
CapturesThis = 8,
|
||||
NoLeadingSourceMap = 16,
|
||||
NoTrailingSourceMap = 32,
|
||||
NoSourceMap = 48,
|
||||
NoNestedSourceMaps = 64,
|
||||
NoTokenLeadingSourceMaps = 128,
|
||||
NoTokenTrailingSourceMaps = 256,
|
||||
NoTokenSourceMaps = 384,
|
||||
NoLeadingComments = 512,
|
||||
NoTrailingComments = 1024,
|
||||
NoComments = 1536,
|
||||
NoNestedComments = 2048,
|
||||
HelperName = 4096,
|
||||
ExportName = 8192,
|
||||
LocalName = 16384,
|
||||
Indented = 32768,
|
||||
NoIndentation = 65536,
|
||||
AsyncFunctionBody = 131072,
|
||||
ReuseTempVariableScope = 262144,
|
||||
CustomPrologue = 524288,
|
||||
NoHoisting = 1048576,
|
||||
HasEndOfDeclarationMarker = 2097152,
|
||||
}
|
||||
interface EmitHelper {
|
||||
readonly name: string;
|
||||
readonly scoped: boolean;
|
||||
readonly text: string;
|
||||
readonly priority?: number;
|
||||
}
|
||||
const enum EmitContext {
|
||||
SourceFile = 0,
|
||||
@@ -3441,10 +3471,40 @@ declare namespace ts {
|
||||
IdentifierName = 2,
|
||||
Unspecified = 3,
|
||||
}
|
||||
interface LexicalEnvironment {
|
||||
startLexicalEnvironment(): void;
|
||||
endLexicalEnvironment(): Statement[];
|
||||
interface EmitHost extends ScriptReferenceHost {
|
||||
getSourceFiles(): SourceFile[];
|
||||
isSourceFileFromExternalLibrary(file: SourceFile): boolean;
|
||||
getCommonSourceDirectory(): string;
|
||||
getCanonicalFileName(fileName: string): string;
|
||||
getNewLine(): string;
|
||||
isEmitBlocked(emitFileName: string): boolean;
|
||||
writeFile: WriteFileCallback;
|
||||
}
|
||||
interface TransformationContext {
|
||||
getCompilerOptions(): CompilerOptions;
|
||||
getEmitResolver(): EmitResolver;
|
||||
getEmitHost(): EmitHost;
|
||||
startLexicalEnvironment(): void;
|
||||
suspendLexicalEnvironment(): void;
|
||||
resumeLexicalEnvironment(): void;
|
||||
endLexicalEnvironment(): Statement[];
|
||||
hoistFunctionDeclaration(node: FunctionDeclaration): void;
|
||||
hoistVariableDeclaration(node: Identifier): void;
|
||||
requestEmitHelper(helper: EmitHelper): void;
|
||||
readEmitHelpers(): EmitHelper[] | undefined;
|
||||
enableSubstitution(kind: SyntaxKind): void;
|
||||
isSubstitutionEnabled(node: Node): boolean;
|
||||
onSubstituteNode?: (emitContext: EmitContext, node: Node) => Node;
|
||||
enableEmitNotification(kind: SyntaxKind): void;
|
||||
isEmitNotificationEnabled(node: Node): boolean;
|
||||
onEmitNode?: (emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void) => void;
|
||||
}
|
||||
interface TransformationResult {
|
||||
transformed: SourceFile[];
|
||||
emitNodeWithSubstitution(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void;
|
||||
emitNodeWithNotification(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void;
|
||||
}
|
||||
type Transformer = (context: TransformationContext) => (node: SourceFile) => SourceFile;
|
||||
interface TextSpan {
|
||||
start: number;
|
||||
length: number;
|
||||
@@ -3476,6 +3536,9 @@ declare namespace ts.performance {
|
||||
function enable(): void;
|
||||
function disable(): void;
|
||||
}
|
||||
declare namespace ts {
|
||||
const version = "2.1.3";
|
||||
}
|
||||
declare namespace ts {
|
||||
const enum Ternary {
|
||||
False = 0,
|
||||
@@ -3523,6 +3586,7 @@ declare namespace ts {
|
||||
function sum(array: any[], prop: string): number;
|
||||
function append<T>(to: T[] | undefined, value: T | undefined): T[] | undefined;
|
||||
function addRange<T>(to: T[] | undefined, from: T[] | undefined): T[] | undefined;
|
||||
function stableSort<T>(array: T[], comparer?: (x: T, y: T) => Comparison): T[];
|
||||
function rangeEquals<T>(array1: T[], array2: T[], pos: number, end: number): boolean;
|
||||
function firstOrUndefined<T>(array: T[]): T;
|
||||
function lastOrUndefined<T>(array: T[]): T;
|
||||
@@ -3540,6 +3604,7 @@ declare namespace ts {
|
||||
function forEachProperty<T, U>(map: Map<T>, callback: (value: T, key: string) => U): U;
|
||||
function someProperties<T>(map: Map<T>, predicate?: (value: T, key: string) => boolean): boolean;
|
||||
function copyProperties<T>(source: Map<T>, target: MapLike<T>): void;
|
||||
function appendProperty<T>(map: Map<T>, key: string | number, value: T): Map<T>;
|
||||
function assign<T1 extends MapLike<{}>, T2, T3>(t: T1, arg1: T2, arg2: T3): T1 & T2 & T3;
|
||||
function assign<T1 extends MapLike<{}>, T2>(t: T1, arg1: T2): T1 & T2;
|
||||
function assign<T1 extends MapLike<{}>>(t: T1, ...args: any[]): any;
|
||||
@@ -3585,6 +3650,7 @@ declare namespace ts {
|
||||
function isExternalModuleNameRelative(moduleName: string): boolean;
|
||||
function getEmitScriptTarget(compilerOptions: CompilerOptions): ScriptTarget;
|
||||
function getEmitModuleKind(compilerOptions: CompilerOptions): ModuleKind;
|
||||
function getEmitModuleResolutionKind(compilerOptions: CompilerOptions): ModuleResolutionKind;
|
||||
function hasZeroOrOneAsteriskCharacter(str: string): boolean;
|
||||
function isRootedDiskPath(path: string): boolean;
|
||||
function convertToRelativePath(absoluteOrRelativePath: string, basePath: string, getCanonicalFileName: (path: string) => string): string;
|
||||
@@ -3662,6 +3728,7 @@ declare namespace ts {
|
||||
function assert(expression: boolean, message?: string, verboseDebugInfo?: () => string): void;
|
||||
function fail(message?: string): void;
|
||||
}
|
||||
function orderedRemoveItem<T>(array: T[], item: T): boolean;
|
||||
function orderedRemoveItemAt<T>(array: T[], index: number): void;
|
||||
function unorderedRemoveItemAt<T>(array: T[], index: number): void;
|
||||
function unorderedRemoveItem<T>(array: T[], item: T): void;
|
||||
@@ -6711,7 +6778,7 @@ declare namespace ts {
|
||||
key: string;
|
||||
message: string;
|
||||
};
|
||||
An_object_rest_element_must_be_an_identifier: {
|
||||
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: {
|
||||
code: number;
|
||||
category: DiagnosticCategory;
|
||||
key: string;
|
||||
@@ -8355,6 +8422,12 @@ declare namespace ts {
|
||||
key: string;
|
||||
message: string;
|
||||
};
|
||||
Language_service_is_disabled: {
|
||||
code: number;
|
||||
category: DiagnosticCategory;
|
||||
key: string;
|
||||
message: string;
|
||||
};
|
||||
JSX_attributes_must_only_be_assigned_a_non_empty_expression: {
|
||||
code: number;
|
||||
category: DiagnosticCategory;
|
||||
@@ -8427,7 +8500,7 @@ declare namespace ts {
|
||||
key: string;
|
||||
message: string;
|
||||
};
|
||||
The_path_in_an_extends_options_must_be_relative_or_rooted: {
|
||||
A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: {
|
||||
code: number;
|
||||
category: DiagnosticCategory;
|
||||
key: string;
|
||||
@@ -8499,6 +8572,24 @@ declare namespace ts {
|
||||
key: string;
|
||||
message: string;
|
||||
};
|
||||
Import_0_from_1: {
|
||||
code: number;
|
||||
category: DiagnosticCategory;
|
||||
key: string;
|
||||
message: string;
|
||||
};
|
||||
Change_0_to_1: {
|
||||
code: number;
|
||||
category: DiagnosticCategory;
|
||||
key: string;
|
||||
message: string;
|
||||
};
|
||||
Add_0_to_existing_import_declaration_from_1: {
|
||||
code: number;
|
||||
category: DiagnosticCategory;
|
||||
key: string;
|
||||
message: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
declare namespace ts {
|
||||
@@ -8679,14 +8770,6 @@ declare namespace ts.server {
|
||||
remove(path: NormalizedPath): void;
|
||||
}
|
||||
function createNormalizedPathMap<T>(): NormalizedPathMap<T>;
|
||||
const nullLanguageService: LanguageService;
|
||||
interface ServerLanguageServiceHost {
|
||||
setCompilationSettings(options: CompilerOptions): void;
|
||||
notifyFileRemoved(info: ScriptInfo): void;
|
||||
startRecordingFilesWithChangedResolutions(): void;
|
||||
finishRecordingFilesWithChangedResolutions(): Path[];
|
||||
}
|
||||
const nullLanguageServiceHost: ServerLanguageServiceHost;
|
||||
interface ProjectOptions {
|
||||
configHasFilesProperty?: boolean;
|
||||
files?: string[];
|
||||
@@ -8718,6 +8801,7 @@ declare namespace ts.server {
|
||||
declare namespace ts {
|
||||
function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void;
|
||||
function isTraceEnabled(compilerOptions: CompilerOptions, host: ModuleResolutionHost): boolean;
|
||||
function moduleHasNonRelativeName(moduleName: string): boolean;
|
||||
function getEffectiveTypeRoots(options: CompilerOptions, host: {
|
||||
directoryExists?: (directoryName: string) => boolean;
|
||||
getCurrentDirectory?: () => string;
|
||||
@@ -8744,15 +8828,6 @@ declare namespace ts {
|
||||
interface StringSymbolWriter extends SymbolWriter {
|
||||
string(): string;
|
||||
}
|
||||
interface EmitHost extends ScriptReferenceHost {
|
||||
getSourceFiles(): SourceFile[];
|
||||
isSourceFileFromExternalLibrary(file: SourceFile): boolean;
|
||||
getCommonSourceDirectory(): string;
|
||||
getCanonicalFileName(fileName: string): string;
|
||||
getNewLine(): string;
|
||||
isEmitBlocked(emitFileName: string): boolean;
|
||||
writeFile: WriteFileCallback;
|
||||
}
|
||||
function getSingleLineStringWriter(): StringSymbolWriter;
|
||||
function releaseStringWriter(writer: StringSymbolWriter): void;
|
||||
function getFullWidth(node: Node): number;
|
||||
@@ -8808,7 +8883,7 @@ declare namespace ts {
|
||||
function isConst(node: Node): boolean;
|
||||
function isLet(node: Node): boolean;
|
||||
function isSuperCall(n: Node): n is SuperCall;
|
||||
function isPrologueDirective(node: Node): boolean;
|
||||
function isPrologueDirective(node: Node): node is PrologueDirective;
|
||||
function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
|
||||
function getLeadingCommentRangesOfNodeFromText(node: Node, text: string): CommentRange[];
|
||||
function getJsDocComments(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
|
||||
@@ -8894,11 +8969,11 @@ declare namespace ts {
|
||||
function isKeyword(token: SyntaxKind): boolean;
|
||||
function isTrivia(token: SyntaxKind): boolean;
|
||||
function isAsyncFunctionLike(node: Node): boolean;
|
||||
function isStringOrNumericLiteral(kind: SyntaxKind): boolean;
|
||||
function isStringOrNumericLiteral(node: Node): node is StringLiteral | NumericLiteral;
|
||||
function hasDynamicName(declaration: Declaration): boolean;
|
||||
function isDynamicName(name: DeclarationName): boolean;
|
||||
function isWellKnownSymbolSyntactically(node: Expression): boolean;
|
||||
function getPropertyNameForPropertyNameNode(name: DeclarationName): string;
|
||||
function getPropertyNameForPropertyNameNode(name: DeclarationName | ParameterDeclaration): string;
|
||||
function getPropertyNameForKnownSymbolName(symbolName: string): string;
|
||||
function isESSymbolIdentifier(node: Node): boolean;
|
||||
function isPushOrUnshiftIdentifier(node: Identifier): boolean;
|
||||
@@ -8921,7 +8996,7 @@ declare namespace ts {
|
||||
function getExpressionAssociativity(expression: Expression): Associativity;
|
||||
function getOperatorAssociativity(kind: SyntaxKind, operator: SyntaxKind, hasArguments?: boolean): Associativity;
|
||||
function getExpressionPrecedence(expression: Expression): 0 | 1 | -1 | 2 | 4 | 3 | 16 | 10 | 5 | 6 | 11 | 8 | 19 | 18 | 17 | 15 | 14 | 13 | 12 | 9 | 7;
|
||||
function getOperator(expression: Expression): SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.NumericLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral | SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.Identifier | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.LetKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AbstractKeyword | SyntaxKind.AsKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.GetKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.NumberKeyword | SyntaxKind.SetKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.TypeKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.FromKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.OfKeyword | SyntaxKind.QualifiedName | SyntaxKind.ComputedPropertyName | SyntaxKind.TypeParameter | SyntaxKind.Parameter | SyntaxKind.Decorator | SyntaxKind.PropertySignature | SyntaxKind.PropertyDeclaration | SyntaxKind.MethodSignature | SyntaxKind.MethodDeclaration | SyntaxKind.Constructor | SyntaxKind.GetAccessor | SyntaxKind.SetAccessor | SyntaxKind.CallSignature | SyntaxKind.ConstructSignature | SyntaxKind.IndexSignature | SyntaxKind.TypePredicate | SyntaxKind.TypeReference | SyntaxKind.FunctionType | SyntaxKind.ConstructorType | SyntaxKind.TypeQuery | SyntaxKind.TypeLiteral | SyntaxKind.ArrayType | SyntaxKind.TupleType | SyntaxKind.UnionType | SyntaxKind.IntersectionType | SyntaxKind.ParenthesizedType | SyntaxKind.ThisType | SyntaxKind.TypeOperator | SyntaxKind.IndexedAccessType | SyntaxKind.MappedType | SyntaxKind.LiteralType | SyntaxKind.ObjectBindingPattern | SyntaxKind.ArrayBindingPattern | SyntaxKind.BinLine truncated
|
||||
function getOperator(expression: Expression): SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.NumericLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral | SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.Identifier | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.LetKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AbstractKeyword | SyntaxKind.AsKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.GetKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.NumberKeyword | SyntaxKind.SetKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.TypeKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.FromKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.OfKeyword | SyntaxKind.QualifiedName | SyntaxKind.ComputedPropertyName | SyntaxKind.TypeParameter | SyntaxKind.Parameter | SyntaxKind.Decorator | SyntaxKind.PropertySignature | SyntaxKind.PropertyDeclaration | SyntaxKind.MethodSignature | SyntaxKind.MethodDeclaration | SyntaxKind.Constructor | SyntaxKind.GetAccessor | SyntaxKind.SetAccessor | SyntaxKind.CallSignature | SyntaxKind.ConstructSignature | SyntaxKind.IndexSignature | SyntaxKind.TypePredicate | SyntaxKind.TypeReference | SyntaxKind.FunctionType | SyntaxKind.ConstructorType | SyntaxKind.TypeQuery | SyntaxKind.TypeLiteral | SyntaxKind.ArrayType | SyntaxKind.TupleType | SyntaxKind.UnionType | SyntaxKind.IntersectionType | SyntaxKind.ParenthesizedType | SyntaxKind.ThisType | SyntaxKind.TypeOperator | SyntaxKind.IndexedAccessType | SyntaxKind.MappedType | SyntaxKind.LiteralType | SyntaxKind.ObjectBindingPattern | SyntaxKind.ArrayBindingPattern | SyntaxKind.BinLine truncated
|
||||
function getOperatorPrecedence(nodeKind: SyntaxKind, operatorKind: SyntaxKind, hasArguments?: boolean): 0 | 1 | -1 | 2 | 4 | 3 | 16 | 10 | 5 | 6 | 11 | 8 | 19 | 18 | 17 | 15 | 14 | 13 | 12 | 9 | 7;
|
||||
function createDiagnosticCollection(): DiagnosticCollection;
|
||||
function escapeString(s: string): string;
|
||||
@@ -8993,7 +9068,8 @@ declare namespace ts {
|
||||
function isLogicalOperator(token: SyntaxKind): boolean;
|
||||
function isAssignmentOperator(token: SyntaxKind): boolean;
|
||||
function tryGetClassExtendingExpressionWithTypeArguments(node: Node): ClassLikeDeclaration | undefined;
|
||||
function isAssignmentExpression(node: Node): node is AssignmentExpression;
|
||||
function isAssignmentExpression(node: Node, excludeCompoundAssignment: true): node is AssignmentExpression<EqualsToken>;
|
||||
function isAssignmentExpression(node: Node, excludeCompoundAssignment?: false): node is AssignmentExpression<AssignmentOperatorToken>;
|
||||
function isDestructuringAssignment(node: Node): node is DestructuringAssignment;
|
||||
function isSupportedExpressionWithTypeArguments(node: ExpressionWithTypeArguments): boolean;
|
||||
function isExpressionWithTypeArgumentsInClassExtendsClause(node: Node): boolean;
|
||||
@@ -9024,15 +9100,6 @@ declare namespace ts {
|
||||
function rangeEndIsOnSameLineAsRangeStart(range1: TextRange, range2: TextRange, sourceFile: SourceFile): boolean;
|
||||
function positionsAreOnSameLine(pos1: number, pos2: number, sourceFile: SourceFile): boolean;
|
||||
function getStartPositionOfRange(range: TextRange, sourceFile: SourceFile): number;
|
||||
interface ExternalModuleInfo {
|
||||
externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[];
|
||||
exportSpecifiers: Map<ExportSpecifier[]>;
|
||||
exportedBindings: Map<Identifier[]>;
|
||||
exportedNames: Identifier[];
|
||||
exportEquals: ExportAssignment | undefined;
|
||||
hasExportStarsToExportValues: boolean;
|
||||
}
|
||||
function collectExternalModuleInfo(sourceFile: SourceFile, resolver: EmitResolver): ExternalModuleInfo;
|
||||
function isDeclarationNameOfEnumOrNamespace(node: Identifier): boolean;
|
||||
function getInitializedVariables(node: VariableDeclarationList): VariableDeclaration[];
|
||||
function isMergedWithClass(node: Node): boolean;
|
||||
@@ -9061,9 +9128,16 @@ declare namespace ts {
|
||||
function isClassElement(node: Node): node is ClassElement;
|
||||
function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
|
||||
function isTypeNode(node: Node): node is TypeNode;
|
||||
function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
|
||||
function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
|
||||
function isBindingPattern(node: Node): node is BindingPattern;
|
||||
function isAssignmentPattern(node: Node): node is AssignmentPattern;
|
||||
function isBindingElement(node: Node): node is BindingElement;
|
||||
function isArrayBindingElement(node: Node): node is ArrayBindingElement;
|
||||
function isDeclarationBindingElement(bindingElement: BindingOrAssignmentElement): bindingElement is VariableDeclaration | ParameterDeclaration | BindingElement;
|
||||
function isBindingOrAssignmentPattern(node: BindingOrAssignmentElementTarget): node is BindingOrAssignmentPattern;
|
||||
function isObjectBindingOrAssignmentPattern(node: BindingOrAssignmentElementTarget): node is ObjectBindingOrAssignmentPattern;
|
||||
function isArrayBindingOrAssignmentPattern(node: BindingOrAssignmentElementTarget): node is ArrayBindingOrAssignmentPattern;
|
||||
function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
|
||||
function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
|
||||
function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
|
||||
@@ -9141,7 +9215,7 @@ declare namespace ts {
|
||||
let unchangedTextChangeRange: TextChangeRange;
|
||||
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
|
||||
function getTypeParameterOwner(d: Declaration): Declaration;
|
||||
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
|
||||
function isParameterPropertyDeclaration(node: Node): boolean;
|
||||
function getCombinedModifierFlags(node: Node): ModifierFlags;
|
||||
function getCombinedNodeFlags(node: Node): NodeFlags;
|
||||
}
|
||||
@@ -9152,7 +9226,7 @@ declare namespace ts {
|
||||
function createSynthesizedNodeArray<T extends Node>(elements?: T[]): NodeArray<T>;
|
||||
function getSynthesizedClone<T extends Node>(node: T): T;
|
||||
function getMutableClone<T extends Node>(node: T): T;
|
||||
function createLiteral(textSource: StringLiteral | Identifier, location?: TextRange): StringLiteral;
|
||||
function createLiteral(textSource: StringLiteral | NumericLiteral | Identifier, location?: TextRange): StringLiteral;
|
||||
function createLiteral(value: string, location?: TextRange): StringLiteral;
|
||||
function createLiteral(value: number, location?: TextRange): NumericLiteral;
|
||||
function createLiteral(value: boolean, location?: TextRange): BooleanLiteral;
|
||||
@@ -9169,7 +9243,7 @@ declare namespace ts {
|
||||
function createComputedPropertyName(expression: Expression, location?: TextRange): ComputedPropertyName;
|
||||
function updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
|
||||
function createParameter(decorators: Decorator[], modifiers: Modifier[], dotDotDotToken: DotDotDotToken, name: string | Identifier | BindingPattern, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression, location?: TextRange, flags?: NodeFlags): ParameterDeclaration;
|
||||
function updateParameter(node: ParameterDeclaration, decorators: Decorator[], modifiers: Modifier[], name: BindingName, type: TypeNode, initializer: Expression): ParameterDeclaration;
|
||||
function updateParameter(node: ParameterDeclaration, decorators: Decorator[], modifiers: Modifier[], dotDotDotToken: DotDotDotToken, name: BindingName, type: TypeNode, initializer: Expression): ParameterDeclaration;
|
||||
function createProperty(decorators: Decorator[], modifiers: Modifier[], name: string | PropertyName, questionToken: QuestionToken, type: TypeNode, initializer: Expression, location?: TextRange): PropertyDeclaration;
|
||||
function updateProperty(node: PropertyDeclaration, decorators: Decorator[], modifiers: Modifier[], name: PropertyName, type: TypeNode, initializer: Expression): PropertyDeclaration;
|
||||
function createMethod(decorators: Decorator[], modifiers: Modifier[], asteriskToken: AsteriskToken, name: string | PropertyName, typeParameters: TypeParameterDeclaration[], parameters: ParameterDeclaration[], type: TypeNode, body: Block, location?: TextRange, flags?: NodeFlags): MethodDeclaration;
|
||||
@@ -9185,7 +9259,7 @@ declare namespace ts {
|
||||
function createArrayBindingPattern(elements: ArrayBindingElement[], location?: TextRange): ArrayBindingPattern;
|
||||
function updateArrayBindingPattern(node: ArrayBindingPattern, elements: ArrayBindingElement[]): ArrayBindingPattern;
|
||||
function createBindingElement(propertyName: string | PropertyName, dotDotDotToken: DotDotDotToken, name: string | BindingName, initializer?: Expression, location?: TextRange): BindingElement;
|
||||
function updateBindingElement(node: BindingElement, propertyName: PropertyName, name: BindingName, initializer: Expression): BindingElement;
|
||||
function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken, propertyName: PropertyName, name: BindingName, initializer: Expression): BindingElement;
|
||||
function createArrayLiteral(elements?: Expression[], location?: TextRange, multiLine?: boolean): ArrayLiteralExpression;
|
||||
function updateArrayLiteral(node: ArrayLiteralExpression, elements: Expression[]): ArrayLiteralExpression;
|
||||
function createObjectLiteral(properties?: ObjectLiteralElementLike[], location?: TextRange, multiLine?: boolean): ObjectLiteralExpression;
|
||||
@@ -9220,6 +9294,7 @@ declare namespace ts {
|
||||
function updatePostfix(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression;
|
||||
function createBinary(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression, location?: TextRange): BinaryExpression;
|
||||
function updateBinary(node: BinaryExpression, left: Expression, right: Expression): BinaryExpression;
|
||||
function createConditional(condition: Expression, whenTrue: Expression, whenFalse: Expression, location?: TextRange): ConditionalExpression;
|
||||
function createConditional(condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression, location?: TextRange): ConditionalExpression;
|
||||
function updateConditional(node: ConditionalExpression, condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
|
||||
function createTemplateExpression(head: TemplateHead, templateSpans: TemplateSpan[], location?: TextRange): TemplateExpression;
|
||||
@@ -9332,8 +9407,10 @@ declare namespace ts {
|
||||
function createMergeDeclarationMarker(original: Node): MergeDeclarationMarker;
|
||||
function createPartiallyEmittedExpression(expression: Expression, original?: Node, location?: TextRange): PartiallyEmittedExpression;
|
||||
function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
|
||||
function createRawExpression(text: string): RawExpression;
|
||||
function createComma(left: Expression, right: Expression): Expression;
|
||||
function createLessThan(left: Expression, right: Expression, location?: TextRange): Expression;
|
||||
function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression, location?: TextRange): DestructuringAssignment;
|
||||
function createAssignment(left: Expression, right: Expression, location?: TextRange): BinaryExpression;
|
||||
function createStrictEquality(left: Expression, right: Expression): BinaryExpression;
|
||||
function createStrictInequality(left: Expression, right: Expression): BinaryExpression;
|
||||
@@ -9344,6 +9421,8 @@ declare namespace ts {
|
||||
function createLogicalOr(left: Expression, right: Expression): BinaryExpression;
|
||||
function createLogicalNot(operand: Expression): PrefixUnaryExpression;
|
||||
function createVoidZero(): VoidExpression;
|
||||
type TypeOfTag = "undefined" | "number" | "boolean" | "string" | "symbol" | "object" | "function";
|
||||
function createTypeCheck(value: Expression, tag: TypeOfTag): BinaryExpression;
|
||||
function createMemberAccessForPropertyName(target: Expression, memberName: PropertyName, location?: TextRange): MemberExpression;
|
||||
function createFunctionCall(func: Expression, thisArg: Expression, argumentsList: Expression[], location?: TextRange): CallExpression;
|
||||
function createFunctionApply(func: Expression, thisArg: Expression, argumentsExpression: Expression, location?: TextRange): CallExpression;
|
||||
@@ -9356,16 +9435,7 @@ declare namespace ts {
|
||||
function createLetStatement(name: Identifier, initializer: Expression, location?: TextRange): VariableStatement;
|
||||
function createLetDeclarationList(declarations: VariableDeclaration[], location?: TextRange): VariableDeclarationList;
|
||||
function createConstDeclarationList(declarations: VariableDeclaration[], location?: TextRange): VariableDeclarationList;
|
||||
function createHelperName(externalHelpersModuleName: Identifier | undefined, name: string): Identifier | PropertyAccessExpression;
|
||||
function createExtendsHelper(externalHelpersModuleName: Identifier | undefined, name: Identifier): CallExpression;
|
||||
function createAssignHelper(externalHelpersModuleName: Identifier | undefined, attributesSegments: Expression[]): CallExpression;
|
||||
function createParamHelper(externalHelpersModuleName: Identifier | undefined, expression: Expression, parameterOffset: number, location?: TextRange): CallExpression;
|
||||
function createMetadataHelper(externalHelpersModuleName: Identifier | undefined, metadataKey: string, metadataValue: Expression): CallExpression;
|
||||
function createDecorateHelper(externalHelpersModuleName: Identifier | undefined, decoratorExpressions: Expression[], target: Expression, memberName?: Expression, descriptor?: Expression, location?: TextRange): CallExpression;
|
||||
function createAwaiterHelper(externalHelpersModuleName: Identifier | undefined, hasLexicalArguments: boolean, promiseConstructor: EntityName | Expression, body: Block): CallExpression;
|
||||
function createHasOwnProperty(target: LeftHandSideExpression, propertyName: Expression): CallExpression;
|
||||
function createAdvancedAsyncSuperHelper(): VariableStatement;
|
||||
function createSimpleAsyncSuperHelper(): VariableStatement;
|
||||
function getHelperName(name: string): Identifier;
|
||||
interface CallBinding {
|
||||
target: LeftHandSideExpression;
|
||||
thisArg: Expression;
|
||||
@@ -9382,9 +9452,12 @@ declare namespace ts {
|
||||
function getDeclarationName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier;
|
||||
function getExternalModuleOrNamespaceExportName(ns: Identifier | undefined, node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier | PropertyAccessExpression;
|
||||
function getNamespaceMemberName(ns: Identifier, name: Identifier, allowComments?: boolean, allowSourceMaps?: boolean): PropertyAccessExpression;
|
||||
function convertToFunctionBody(node: ConciseBody, multiLine?: boolean): Block;
|
||||
function addPrologueDirectives(target: Statement[], source: Statement[], ensureUseStrict?: boolean, visitor?: (node: Node) => VisitResult<Node>): number;
|
||||
function ensureUseStrict(node: SourceFile): SourceFile;
|
||||
function startsWithUseStrict(statements: Statement[]): boolean;
|
||||
function ensureUseStrict(statements: NodeArray<Statement>): NodeArray<Statement>;
|
||||
function parenthesizeBinaryOperand(binaryOperator: SyntaxKind, operand: Expression, isLeftSideOfBinary: boolean, leftOperand?: Expression): Expression;
|
||||
function parenthesizeForConditionalHead(condition: Expression): Expression;
|
||||
function parenthesizeForNew(expression: Expression): LeftHandSideExpression;
|
||||
function parenthesizeForAccess(expression: Expression): LeftHandSideExpression;
|
||||
function parenthesizePostfixOperand(operand: Expression): LeftHandSideExpression;
|
||||
@@ -9409,16 +9482,25 @@ declare namespace ts {
|
||||
function startOnNewLine<T extends Node>(node: T): T;
|
||||
function setOriginalNode<T extends Node>(node: T, original: Node): T;
|
||||
function disposeEmitNodes(sourceFile: SourceFile): void;
|
||||
function getOrCreateEmitNode(node: Node): EmitNode;
|
||||
function getEmitFlags(node: Node): EmitFlags;
|
||||
function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T;
|
||||
function setSourceMapRange<T extends Node>(node: T, range: TextRange): T;
|
||||
function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: TextRange): T;
|
||||
function setCommentRange<T extends Node>(node: T, range: TextRange): T;
|
||||
function getCommentRange(node: Node): TextRange;
|
||||
function getSourceMapRange(node: Node): TextRange;
|
||||
function setSourceMapRange<T extends Node>(node: T, range: TextRange): T;
|
||||
function getTokenSourceMapRange(node: Node, token: SyntaxKind): TextRange;
|
||||
function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: TextRange): T;
|
||||
function getCommentRange(node: Node): TextRange;
|
||||
function setCommentRange<T extends Node>(node: T, range: TextRange): T;
|
||||
function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number;
|
||||
function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: number): PropertyAccessExpression | ElementAccessExpression;
|
||||
function getExternalHelpersModuleName(node: SourceFile): Identifier;
|
||||
function getOrCreateExternalHelpersModuleNameIfNeeded(node: SourceFile, compilerOptions: CompilerOptions): Identifier;
|
||||
function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T;
|
||||
function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T;
|
||||
function removeEmitHelper(node: Node, helper: EmitHelper): boolean;
|
||||
function getEmitHelpers(node: Node): EmitHelper[] | undefined;
|
||||
function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void;
|
||||
function compareEmitHelpers(x: EmitHelper, y: EmitHelper): Comparison;
|
||||
function setTextRange<T extends TextRange>(node: T, location: TextRange): T;
|
||||
function setNodeFlags<T extends Node>(node: T, flags: NodeFlags): T;
|
||||
function setMultiLine<T extends ObjectLiteralExpression | ArrayLiteralExpression | Block>(node: T, multiLine: boolean): T;
|
||||
@@ -9426,12 +9508,27 @@ declare namespace ts {
|
||||
function getLocalNameForExternalImport(node: ImportDeclaration | ExportDeclaration | ImportEqualsDeclaration, sourceFile: SourceFile): Identifier;
|
||||
function getExternalModuleNameLiteral(importNode: ImportDeclaration | ExportDeclaration | ImportEqualsDeclaration, sourceFile: SourceFile, host: EmitHost, resolver: EmitResolver, compilerOptions: CompilerOptions): StringLiteral;
|
||||
function tryGetModuleNameFromFile(file: SourceFile, host: EmitHost, options: CompilerOptions): StringLiteral;
|
||||
function transformFunctionBody(node: FunctionLikeDeclaration, visitor: (node: Node) => VisitResult<Node>, currentSourceFile: SourceFile, context: TransformationContext, enableSubstitutionsForCapturedThis: () => void, convertObjectRest?: boolean): Block;
|
||||
function addCaptureThisForNodeIfNeeded(statements: Statement[], node: Node, enableSubstitutionsForCapturedThis: () => void): void;
|
||||
function captureThisForNode(statements: Statement[], node: Node, initializer: Expression | undefined, enableSubstitutionsForCapturedThis?: () => void, originalStatement?: Statement): void;
|
||||
function addDefaultValueAssignmentsIfNeeded(statements: Statement[], node: FunctionLikeDeclaration, visitor: (node: Node) => VisitResult<Node>, convertObjectRest: boolean): void;
|
||||
function addRestParameterIfNeeded(statements: Statement[], node: FunctionLikeDeclaration, inConstructorWithSynthesizedSuper: boolean): void;
|
||||
function convertForOf(node: ForOfStatement, convertedLoopBodyStatements: Statement[], visitor: (node: Node) => VisitResult<Node>, enableSubstitutionsForBlockScopedBindings: () => void, context: TransformationContext, convertObjectRest?: boolean): ForStatement | ForOfStatement;
|
||||
function getInitializerOfBindingOrAssignmentElement(bindingElement: BindingOrAssignmentElement): Expression | undefined;
|
||||
function getTargetOfBindingOrAssignmentElement(bindingElement: BindingOrAssignmentElement): BindingOrAssignmentElementTarget;
|
||||
function getRestIndicatorOfBindingOrAssignmentElement(bindingElement: BindingOrAssignmentElement): BindingOrAssignmentElementRestIndicator;
|
||||
function getPropertyNameOfBindingOrAssignmentElement(bindingElement: BindingOrAssignmentElement): PropertyName;
|
||||
function getElementsOfBindingOrAssignmentPattern(name: BindingOrAssignmentPattern): BindingOrAssignmentElement[];
|
||||
function convertToArrayAssignmentElement(element: BindingOrAssignmentElement): Expression;
|
||||
function convertToObjectAssignmentElement(element: BindingOrAssignmentElement): ObjectLiteralElementLike;
|
||||
function convertToAssignmentPattern(node: BindingOrAssignmentPattern): AssignmentPattern;
|
||||
function convertToObjectAssignmentPattern(node: ObjectBindingOrAssignmentPattern): ObjectLiteralExpression;
|
||||
function convertToArrayAssignmentPattern(node: ArrayBindingOrAssignmentPattern): ArrayLiteralExpression;
|
||||
function convertToAssignmentElementTarget(node: BindingOrAssignmentElementTarget): Expression;
|
||||
interface ExternalModuleInfo {
|
||||
externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[];
|
||||
externalHelpersImportDeclaration: ImportDeclaration | undefined;
|
||||
exportSpecifiers: Map<ExportSpecifier[]>;
|
||||
exportedBindings: Map<Identifier[]>;
|
||||
exportedNames: Identifier[];
|
||||
exportEquals: ExportAssignment | undefined;
|
||||
hasExportStarsToExportValues: boolean;
|
||||
}
|
||||
function collectExternalModuleInfo(sourceFile: SourceFile, resolver: EmitResolver, compilerOptions: CompilerOptions): ExternalModuleInfo;
|
||||
}
|
||||
declare namespace ts {
|
||||
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
|
||||
@@ -9467,12 +9564,18 @@ declare namespace ts {
|
||||
}
|
||||
declare namespace ts {
|
||||
type VisitResult<T extends Node> = T | T[];
|
||||
function reduceEachChild<T>(node: Node, f: (memo: T, node: Node) => T, initial: T): T;
|
||||
function reduceEachChild<T>(node: Node, initial: T, cbNode: (memo: T, node: Node) => T, cbNodeArray?: (memo: T, nodes: Node[]) => T): T;
|
||||
function visitNode<T extends Node>(node: T, visitor: (node: Node) => VisitResult<Node>, test: (node: Node) => boolean, optional?: boolean, lift?: (node: NodeArray<Node>) => T): T;
|
||||
function visitNode<T extends Node>(node: T, visitor: (node: Node) => VisitResult<Node>, test: (node: Node) => boolean, optional: boolean, lift: (node: NodeArray<Node>) => T, parenthesize: (node: Node, parentNode: Node) => Node, parentNode: Node): T;
|
||||
function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: (node: Node) => VisitResult<Node>, test: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
|
||||
function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: (node: Node) => VisitResult<Node>, test: (node: Node) => boolean, start: number, count: number, parenthesize: (node: Node, parentNode: Node) => Node, parentNode: Node): NodeArray<T>;
|
||||
function visitEachChild<T extends Node>(node: T, visitor: (node: Node) => VisitResult<Node>, context: LexicalEnvironment): T;
|
||||
function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext, start?: number, ensureUseStrict?: boolean): NodeArray<Statement>;
|
||||
function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext): NodeArray<ParameterDeclaration>;
|
||||
function visitFunctionBody(node: FunctionBody, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext): FunctionBody;
|
||||
function visitFunctionBody(node: ConciseBody, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext): ConciseBody;
|
||||
function visitEachChild<T extends Node>(node: T, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext): T;
|
||||
function mergeLexicalEnvironment(statements: NodeArray<Statement>, declarations: Statement[]): NodeArray<Statement>;
|
||||
function mergeLexicalEnvironment(statements: Statement[], declarations: Statement[]): Statement[];
|
||||
function mergeFunctionBodyLexicalEnvironment(body: FunctionBody, declarations: Statement[]): FunctionBody;
|
||||
function mergeFunctionBodyLexicalEnvironment(body: ConciseBody, declarations: Statement[]): ConciseBody;
|
||||
function liftToBlock(nodes: Node[]): Statement;
|
||||
@@ -9480,23 +9583,30 @@ declare namespace ts {
|
||||
namespace Debug {
|
||||
const failNotOptional: typeof noop;
|
||||
const failBadSyntaxKind: (node: Node, message?: string) => void;
|
||||
const assertEachNode: (nodes: Node[], test: (node: Node) => boolean, message?: string) => void;
|
||||
const assertNode: (node: Node, test: (node: Node) => boolean, message?: string) => void;
|
||||
const assertOptionalNode: (node: Node, test: (node: Node) => boolean, message?: string) => void;
|
||||
const assertOptionalToken: (node: Node, kind: SyntaxKind, message?: string) => void;
|
||||
const assertMissingNode: (node: Node, message?: string) => void;
|
||||
}
|
||||
}
|
||||
declare namespace ts {
|
||||
function flattenDestructuringAssignment(context: TransformationContext, node: BinaryExpression, needsValue: boolean, recordTempVariable: (node: Identifier) => void, visitor?: (node: Node) => VisitResult<Node>, transformRest?: boolean): Expression;
|
||||
function flattenParameterDestructuring(node: ParameterDeclaration, value: Expression, visitor?: (node: Node) => VisitResult<Node>, transformRest?: boolean): VariableDeclaration[];
|
||||
function flattenVariableDestructuring(node: VariableDeclaration, value?: Expression, visitor?: (node: Node) => VisitResult<Node>, recordTempVariable?: (node: Identifier) => void, transformRest?: boolean): VariableDeclaration[];
|
||||
function flattenVariableDestructuringToExpression(node: VariableDeclaration, recordTempVariable: (name: Identifier) => void, createAssignmentCallback?: (name: Identifier, value: Expression, location?: TextRange) => Expression, visitor?: (node: Node) => VisitResult<Node>): Expression;
|
||||
const enum FlattenLevel {
|
||||
All = 0,
|
||||
ObjectRest = 1,
|
||||
}
|
||||
function flattenDestructuringAssignment(node: VariableDeclaration | DestructuringAssignment, visitor: ((node: Node) => VisitResult<Node>) | undefined, context: TransformationContext, level: FlattenLevel, needsValue?: boolean, createAssignmentCallback?: (name: Identifier, value: Expression, location?: TextRange) => Expression): Expression;
|
||||
function flattenDestructuringBinding(node: VariableDeclaration | ParameterDeclaration, visitor: (node: Node) => VisitResult<Node>, context: TransformationContext, level: FlattenLevel, rval?: Expression, hoistTempVariables?: boolean, skipInitializer?: boolean): VariableDeclaration[];
|
||||
}
|
||||
declare namespace ts {
|
||||
function transformTypeScript(context: TransformationContext): (node: SourceFile) => SourceFile;
|
||||
}
|
||||
declare namespace ts {
|
||||
function transformJsx(context: TransformationContext): (node: SourceFile) => SourceFile;
|
||||
function transformESNext(context: TransformationContext): (node: SourceFile) => SourceFile;
|
||||
function createAssignHelper(context: TransformationContext, attributesSegments: Expression[]): CallExpression;
|
||||
}
|
||||
declare namespace ts {
|
||||
function transformESNext(context: TransformationContext): (node: SourceFile) => SourceFile;
|
||||
function transformJsx(context: TransformationContext): (node: SourceFile) => SourceFile;
|
||||
}
|
||||
declare namespace ts {
|
||||
function transformES2017(context: TransformationContext): (node: SourceFile) => SourceFile;
|
||||
@@ -9523,25 +9633,6 @@ declare namespace ts {
|
||||
function transformES2015Module(context: TransformationContext): (node: SourceFile) => SourceFile;
|
||||
}
|
||||
declare namespace ts {
|
||||
interface TransformationResult {
|
||||
transformed: SourceFile[];
|
||||
emitNodeWithSubstitution(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void;
|
||||
emitNodeWithNotification(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void;
|
||||
}
|
||||
interface TransformationContext extends LexicalEnvironment {
|
||||
getCompilerOptions(): CompilerOptions;
|
||||
getEmitResolver(): EmitResolver;
|
||||
getEmitHost(): EmitHost;
|
||||
hoistFunctionDeclaration(node: FunctionDeclaration): void;
|
||||
hoistVariableDeclaration(node: Identifier): void;
|
||||
enableSubstitution(kind: SyntaxKind): void;
|
||||
isSubstitutionEnabled(node: Node): boolean;
|
||||
onSubstituteNode?: (emitContext: EmitContext, node: Node) => Node;
|
||||
enableEmitNotification(kind: SyntaxKind): void;
|
||||
isEmitNotificationEnabled(node: Node): boolean;
|
||||
onEmitNode?: (emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void) => void;
|
||||
}
|
||||
type Transformer = (context: TransformationContext) => (node: SourceFile) => SourceFile;
|
||||
function getTransformers(compilerOptions: CompilerOptions): Transformer[];
|
||||
function transformFiles(resolver: EmitResolver, host: EmitHost, sourceFiles: SourceFile[], transformers: Transformer[]): TransformationResult;
|
||||
}
|
||||
@@ -9577,7 +9668,6 @@ declare namespace ts {
|
||||
function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile, emitOnlyDtsFiles?: boolean): EmitResult;
|
||||
}
|
||||
declare namespace ts {
|
||||
const version = "2.2.0";
|
||||
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
|
||||
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
||||
function computeCommonSourceDirectoryOfFilenames(fileNames: string[], currentDirectory: string, getCanonicalFileName: (fileName: string) => string): string;
|
||||
@@ -9642,6 +9732,7 @@ declare namespace ts {
|
||||
nameTable: Map<number>;
|
||||
getNamedDeclarations(): Map<Declaration[]>;
|
||||
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
||||
getLineEndOfPosition(pos: number): number;
|
||||
getLineStarts(): number[];
|
||||
getPositionOfLineAndCharacter(line: number, character: number): number;
|
||||
update(newText: string, textChangeRange: TextChangeRange): SourceFile;
|
||||
@@ -10772,6 +10863,8 @@ declare namespace ts {
|
||||
span: TextSpan;
|
||||
program: Program;
|
||||
newLineCharacter: string;
|
||||
host: LanguageServiceHost;
|
||||
cancellationToken: CancellationToken;
|
||||
}
|
||||
namespace codefix {
|
||||
function registerCodeFix(action: CodeFix): void;
|
||||
@@ -10834,7 +10927,7 @@ declare namespace ts.server {
|
||||
}
|
||||
}
|
||||
declare namespace ts.server {
|
||||
class LSHost implements ts.LanguageServiceHost, ModuleResolutionHost, ServerLanguageServiceHost {
|
||||
class LSHost implements ts.LanguageServiceHost, ModuleResolutionHost {
|
||||
private readonly host;
|
||||
private readonly project;
|
||||
private readonly cancellationToken;
|
||||
@@ -10932,11 +11025,11 @@ declare namespace ts.server {
|
||||
get(path: Path): ReadonlyArray<string>;
|
||||
set(path: Path, value: ReadonlyArray<string>): void;
|
||||
}
|
||||
function createNoSemanticFeaturesWrapper(realLanguageService: LanguageService): LanguageService;
|
||||
abstract class Project {
|
||||
readonly projectKind: ProjectKind;
|
||||
readonly projectService: ProjectService;
|
||||
private documentRegistry;
|
||||
languageServiceEnabled: boolean;
|
||||
private compilerOptions;
|
||||
compileOnSaveEnabled: boolean;
|
||||
private rootFiles;
|
||||
@@ -10945,7 +11038,9 @@ declare namespace ts.server {
|
||||
private program;
|
||||
private cachedUnresolvedImportsPerFile;
|
||||
private lastCachedUnresolvedImportsList;
|
||||
private languageService;
|
||||
private readonly languageService;
|
||||
private readonly noSemanticFeaturesLanguageService;
|
||||
languageServiceEnabled: boolean;
|
||||
builder: Builder;
|
||||
private lastReportedFileNames;
|
||||
private lastReportedVersion;
|
||||
@@ -11003,7 +11098,7 @@ declare namespace ts.server {
|
||||
private static NextId;
|
||||
private readonly inferredProjectName;
|
||||
directoriesWatchedForTsconfig: string[];
|
||||
constructor(projectService: ProjectService, documentRegistry: ts.DocumentRegistry, languageServiceEnabled: boolean, compilerOptions: CompilerOptions);
|
||||
constructor(projectService: ProjectService, documentRegistry: ts.DocumentRegistry, compilerOptions: CompilerOptions);
|
||||
getProjectName(): string;
|
||||
getProjectRootPath(): string;
|
||||
close(): void;
|
||||
@@ -11050,20 +11145,32 @@ declare namespace ts.server {
|
||||
}
|
||||
declare namespace ts.server {
|
||||
const maxProgramSizeForNonTsFiles: number;
|
||||
type ProjectServiceEvent = {
|
||||
eventName: "context";
|
||||
const ContextEvent = "context";
|
||||
const ConfigFileDiagEvent = "configFileDiag";
|
||||
const ProjectLanguageServiceStateEvent = "projectLanguageServiceState";
|
||||
interface ContextEvent {
|
||||
eventName: typeof ContextEvent;
|
||||
data: {
|
||||
project: Project;
|
||||
fileName: NormalizedPath;
|
||||
};
|
||||
} | {
|
||||
eventName: "configFileDiag";
|
||||
}
|
||||
interface ConfigFileDiagEvent {
|
||||
eventName: typeof ConfigFileDiagEvent;
|
||||
data: {
|
||||
triggerFile: string;
|
||||
configFileName: string;
|
||||
diagnostics: Diagnostic[];
|
||||
};
|
||||
};
|
||||
}
|
||||
interface ProjectLanguageServiceStateEvent {
|
||||
eventName: typeof ProjectLanguageServiceStateEvent;
|
||||
data: {
|
||||
project: Project;
|
||||
languageServiceEnabled: boolean;
|
||||
};
|
||||
}
|
||||
type ProjectServiceEvent = ContextEvent | ConfigFileDiagEvent | ProjectLanguageServiceStateEvent;
|
||||
interface ProjectServiceEventHandler {
|
||||
(event: ProjectServiceEvent): void;
|
||||
}
|
||||
@@ -11107,6 +11214,7 @@ declare namespace ts.server {
|
||||
getChangedFiles_TestOnly(): ScriptInfo[];
|
||||
ensureInferredProjectsUpToDate_TestOnly(): void;
|
||||
getCompilerOptionsForInferredProjects(): CompilerOptions;
|
||||
onUpdateLanguageServiceStateForProject(project: Project, languageServiceEnabled: boolean): void;
|
||||
updateTypingsForProject(response: SetTypings | InvalidateCachedTypings): void;
|
||||
setCompilerOptionsForInferredProjects(projectCompilerOptions: protocol.ExternalProjectCompilerOptions): void;
|
||||
stopWatchingDirectory(directory: string): void;
|
||||
@@ -11642,4 +11750,4 @@ declare namespace ts {
|
||||
declare namespace TypeScript.Services {
|
||||
const TypeScriptServicesFactory: typeof ts.TypeScriptServicesFactory;
|
||||
}
|
||||
declare const toolsVersion = "2.2";
|
||||
declare const toolsVersion = "2.1";
|
||||
+3037
-2526
File diff suppressed because it is too large.
Load diff
Vendored
+32
-20
@@ -333,7 +333,8 @@ declare namespace ts {
|
||||
PartiallyEmittedExpression = 293,
|
||||
MergeDeclarationMarker = 294,
|
||||
EndOfDeclarationMarker = 295,
|
||||
Count = 296,
|
||||
RawExpression = 296,
|
||||
Count = 297,
|
||||
FirstAssignment = 57,
|
||||
LastAssignment = 69,
|
||||
FirstCompoundAssignment = 58,
|
||||
@@ -464,14 +465,14 @@ declare namespace ts {
|
||||
right: Identifier;
|
||||
}
|
||||
type EntityName = Identifier | QualifiedName;
|
||||
type PropertyName = Identifier | LiteralExpression | ComputedPropertyName;
|
||||
type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern;
|
||||
type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName;
|
||||
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
|
||||
interface Declaration extends Node {
|
||||
_declarationBrand: any;
|
||||
name?: DeclarationName;
|
||||
}
|
||||
interface DeclarationStatement extends Declaration, Statement {
|
||||
name?: Identifier | LiteralExpression;
|
||||
name?: Identifier | StringLiteral | NumericLiteral;
|
||||
}
|
||||
interface ComputedPropertyName extends Node {
|
||||
kind: SyntaxKind.ComputedPropertyName;
|
||||
@@ -573,18 +574,16 @@ declare namespace ts {
|
||||
interface PropertyLikeDeclaration extends Declaration {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface BindingPattern extends Node {
|
||||
elements: NodeArray<BindingElement | ArrayBindingElement>;
|
||||
}
|
||||
interface ObjectBindingPattern extends BindingPattern {
|
||||
interface ObjectBindingPattern extends Node {
|
||||
kind: SyntaxKind.ObjectBindingPattern;
|
||||
elements: NodeArray<BindingElement>;
|
||||
}
|
||||
type ArrayBindingElement = BindingElement | OmittedExpression;
|
||||
interface ArrayBindingPattern extends BindingPattern {
|
||||
interface ArrayBindingPattern extends Node {
|
||||
kind: SyntaxKind.ArrayBindingPattern;
|
||||
elements: NodeArray<ArrayBindingElement>;
|
||||
}
|
||||
type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
|
||||
type ArrayBindingElement = BindingElement | OmittedExpression;
|
||||
/**
|
||||
* Several node kinds share function-like features such as a signature,
|
||||
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
|
||||
@@ -809,17 +808,25 @@ declare namespace ts {
|
||||
operatorToken: BinaryOperatorToken;
|
||||
right: Expression;
|
||||
}
|
||||
interface AssignmentExpression extends BinaryExpression {
|
||||
type AssignmentOperatorToken = Token<AssignmentOperator>;
|
||||
interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
|
||||
left: LeftHandSideExpression;
|
||||
operatorToken: Token<SyntaxKind.EqualsToken>;
|
||||
operatorToken: TOperator;
|
||||
}
|
||||
interface ObjectDestructuringAssignment extends AssignmentExpression {
|
||||
interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
|
||||
left: ObjectLiteralExpression;
|
||||
}
|
||||
interface ArrayDestructuringAssignment extends AssignmentExpression {
|
||||
interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
|
||||
left: ArrayLiteralExpression;
|
||||
}
|
||||
type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
|
||||
type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
|
||||
type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
|
||||
type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Expression;
|
||||
type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
|
||||
type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
|
||||
type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
|
||||
type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
|
||||
interface ConditionalExpression extends Expression {
|
||||
kind: SyntaxKind.ConditionalExpression;
|
||||
condition: Expression;
|
||||
@@ -1180,7 +1187,7 @@ declare namespace ts {
|
||||
type ModuleName = Identifier | StringLiteral;
|
||||
interface ModuleDeclaration extends DeclarationStatement {
|
||||
kind: SyntaxKind.ModuleDeclaration;
|
||||
name: Identifier | LiteralExpression;
|
||||
name: Identifier | StringLiteral;
|
||||
body?: ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | Identifier;
|
||||
}
|
||||
interface NamespaceDeclaration extends ModuleDeclaration {
|
||||
@@ -1332,7 +1339,7 @@ declare namespace ts {
|
||||
type JSDocTypeReferencingNode = JSDocThisType | JSDocConstructorType | JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
|
||||
interface JSDocRecordMember extends PropertySignature {
|
||||
kind: SyntaxKind.JSDocRecordMember;
|
||||
name: Identifier | LiteralExpression;
|
||||
name: Identifier | StringLiteral | NumericLiteral;
|
||||
type?: JSDocType;
|
||||
}
|
||||
interface JSDoc extends Node {
|
||||
@@ -1596,6 +1603,7 @@ declare namespace ts {
|
||||
getJsxIntrinsicTagNames(): Symbol[];
|
||||
isOptionalParameter(node: ParameterDeclaration): boolean;
|
||||
getAmbientModules(): Symbol[];
|
||||
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
|
||||
}
|
||||
interface SymbolDisplayBuilder {
|
||||
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
@@ -1962,7 +1970,7 @@ declare namespace ts {
|
||||
target?: ScriptTarget;
|
||||
traceResolution?: boolean;
|
||||
types?: string[];
|
||||
/** Paths used to used to compute primary types search locations */
|
||||
/** Paths used to compute primary types search locations */
|
||||
typeRoots?: string[];
|
||||
[option: string]: CompilerOptionsValue | undefined;
|
||||
}
|
||||
@@ -2129,6 +2137,10 @@ declare namespace ts {
|
||||
_children: Node[];
|
||||
}
|
||||
}
|
||||
declare namespace ts {
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version = "2.1.3";
|
||||
}
|
||||
declare namespace ts {
|
||||
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
|
||||
type DirectoryWatcherCallback = (fileName: string) => void;
|
||||
@@ -2260,7 +2272,7 @@ declare namespace ts {
|
||||
*/
|
||||
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
|
||||
function getTypeParameterOwner(d: Declaration): Declaration;
|
||||
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
|
||||
function isParameterPropertyDeclaration(node: Node): boolean;
|
||||
function getCombinedModifierFlags(node: Node): ModifierFlags;
|
||||
function getCombinedNodeFlags(node: Node): NodeFlags;
|
||||
}
|
||||
@@ -2273,6 +2285,7 @@ declare namespace ts {
|
||||
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
|
||||
}
|
||||
declare namespace ts {
|
||||
function moduleHasNonRelativeName(moduleName: string): boolean;
|
||||
function getEffectiveTypeRoots(options: CompilerOptions, host: {
|
||||
directoryExists?: (directoryName: string) => boolean;
|
||||
getCurrentDirectory?: () => string;
|
||||
@@ -2297,8 +2310,6 @@ declare namespace ts {
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
}
|
||||
declare namespace ts {
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version = "2.2.0";
|
||||
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
|
||||
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
@@ -2393,6 +2404,7 @@ declare namespace ts {
|
||||
}
|
||||
interface SourceFile {
|
||||
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
||||
getLineEndOfPosition(pos: number): number;
|
||||
getLineStarts(): number[];
|
||||
getPositionOfLineAndCharacter(line: number, character: number): number;
|
||||
update(newText: string, textChangeRange: TextChangeRange): SourceFile;
|
||||
|
||||
+4294
-3100
File diff suppressed because it is too large.
Load diff
Vendored
+32
-20
@@ -333,7 +333,8 @@ declare namespace ts {
|
||||
PartiallyEmittedExpression = 293,
|
||||
MergeDeclarationMarker = 294,
|
||||
EndOfDeclarationMarker = 295,
|
||||
Count = 296,
|
||||
RawExpression = 296,
|
||||
Count = 297,
|
||||
FirstAssignment = 57,
|
||||
LastAssignment = 69,
|
||||
FirstCompoundAssignment = 58,
|
||||
@@ -464,14 +465,14 @@ declare namespace ts {
|
||||
right: Identifier;
|
||||
}
|
||||
type EntityName = Identifier | QualifiedName;
|
||||
type PropertyName = Identifier | LiteralExpression | ComputedPropertyName;
|
||||
type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern;
|
||||
type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName;
|
||||
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
|
||||
interface Declaration extends Node {
|
||||
_declarationBrand: any;
|
||||
name?: DeclarationName;
|
||||
}
|
||||
interface DeclarationStatement extends Declaration, Statement {
|
||||
name?: Identifier | LiteralExpression;
|
||||
name?: Identifier | StringLiteral | NumericLiteral;
|
||||
}
|
||||
interface ComputedPropertyName extends Node {
|
||||
kind: SyntaxKind.ComputedPropertyName;
|
||||
@@ -573,18 +574,16 @@ declare namespace ts {
|
||||
interface PropertyLikeDeclaration extends Declaration {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface BindingPattern extends Node {
|
||||
elements: NodeArray<BindingElement | ArrayBindingElement>;
|
||||
}
|
||||
interface ObjectBindingPattern extends BindingPattern {
|
||||
interface ObjectBindingPattern extends Node {
|
||||
kind: SyntaxKind.ObjectBindingPattern;
|
||||
elements: NodeArray<BindingElement>;
|
||||
}
|
||||
type ArrayBindingElement = BindingElement | OmittedExpression;
|
||||
interface ArrayBindingPattern extends BindingPattern {
|
||||
interface ArrayBindingPattern extends Node {
|
||||
kind: SyntaxKind.ArrayBindingPattern;
|
||||
elements: NodeArray<ArrayBindingElement>;
|
||||
}
|
||||
type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
|
||||
type ArrayBindingElement = BindingElement | OmittedExpression;
|
||||
/**
|
||||
* Several node kinds share function-like features such as a signature,
|
||||
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
|
||||
@@ -809,17 +808,25 @@ declare namespace ts {
|
||||
operatorToken: BinaryOperatorToken;
|
||||
right: Expression;
|
||||
}
|
||||
interface AssignmentExpression extends BinaryExpression {
|
||||
type AssignmentOperatorToken = Token<AssignmentOperator>;
|
||||
interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
|
||||
left: LeftHandSideExpression;
|
||||
operatorToken: Token<SyntaxKind.EqualsToken>;
|
||||
operatorToken: TOperator;
|
||||
}
|
||||
interface ObjectDestructuringAssignment extends AssignmentExpression {
|
||||
interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
|
||||
left: ObjectLiteralExpression;
|
||||
}
|
||||
interface ArrayDestructuringAssignment extends AssignmentExpression {
|
||||
interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
|
||||
left: ArrayLiteralExpression;
|
||||
}
|
||||
type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
|
||||
type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
|
||||
type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
|
||||
type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Expression;
|
||||
type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
|
||||
type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
|
||||
type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
|
||||
type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
|
||||
interface ConditionalExpression extends Expression {
|
||||
kind: SyntaxKind.ConditionalExpression;
|
||||
condition: Expression;
|
||||
@@ -1180,7 +1187,7 @@ declare namespace ts {
|
||||
type ModuleName = Identifier | StringLiteral;
|
||||
interface ModuleDeclaration extends DeclarationStatement {
|
||||
kind: SyntaxKind.ModuleDeclaration;
|
||||
name: Identifier | LiteralExpression;
|
||||
name: Identifier | StringLiteral;
|
||||
body?: ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | Identifier;
|
||||
}
|
||||
interface NamespaceDeclaration extends ModuleDeclaration {
|
||||
@@ -1332,7 +1339,7 @@ declare namespace ts {
|
||||
type JSDocTypeReferencingNode = JSDocThisType | JSDocConstructorType | JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
|
||||
interface JSDocRecordMember extends PropertySignature {
|
||||
kind: SyntaxKind.JSDocRecordMember;
|
||||
name: Identifier | LiteralExpression;
|
||||
name: Identifier | StringLiteral | NumericLiteral;
|
||||
type?: JSDocType;
|
||||
}
|
||||
interface JSDoc extends Node {
|
||||
@@ -1596,6 +1603,7 @@ declare namespace ts {
|
||||
getJsxIntrinsicTagNames(): Symbol[];
|
||||
isOptionalParameter(node: ParameterDeclaration): boolean;
|
||||
getAmbientModules(): Symbol[];
|
||||
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
|
||||
}
|
||||
interface SymbolDisplayBuilder {
|
||||
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
@@ -1962,7 +1970,7 @@ declare namespace ts {
|
||||
target?: ScriptTarget;
|
||||
traceResolution?: boolean;
|
||||
types?: string[];
|
||||
/** Paths used to used to compute primary types search locations */
|
||||
/** Paths used to compute primary types search locations */
|
||||
typeRoots?: string[];
|
||||
[option: string]: CompilerOptionsValue | undefined;
|
||||
}
|
||||
@@ -2129,6 +2137,10 @@ declare namespace ts {
|
||||
_children: Node[];
|
||||
}
|
||||
}
|
||||
declare namespace ts {
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version = "2.1.3";
|
||||
}
|
||||
declare namespace ts {
|
||||
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
|
||||
type DirectoryWatcherCallback = (fileName: string) => void;
|
||||
@@ -2260,7 +2272,7 @@ declare namespace ts {
|
||||
*/
|
||||
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
|
||||
function getTypeParameterOwner(d: Declaration): Declaration;
|
||||
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
|
||||
function isParameterPropertyDeclaration(node: Node): boolean;
|
||||
function getCombinedModifierFlags(node: Node): ModifierFlags;
|
||||
function getCombinedNodeFlags(node: Node): NodeFlags;
|
||||
}
|
||||
@@ -2273,6 +2285,7 @@ declare namespace ts {
|
||||
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
|
||||
}
|
||||
declare namespace ts {
|
||||
function moduleHasNonRelativeName(moduleName: string): boolean;
|
||||
function getEffectiveTypeRoots(options: CompilerOptions, host: {
|
||||
directoryExists?: (directoryName: string) => boolean;
|
||||
getCurrentDirectory?: () => string;
|
||||
@@ -2297,8 +2310,6 @@ declare namespace ts {
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
}
|
||||
declare namespace ts {
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version = "2.2.0";
|
||||
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
|
||||
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
@@ -2393,6 +2404,7 @@ declare namespace ts {
|
||||
}
|
||||
interface SourceFile {
|
||||
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
||||
getLineEndOfPosition(pos: number): number;
|
||||
getLineStarts(): number[];
|
||||
getPositionOfLineAndCharacter(line: number, character: number): number;
|
||||
update(newText: string, textChangeRange: TextChangeRange): SourceFile;
|
||||
|
||||
+4294
-3100
File diff suppressed because it is too large.
Load diff
+85
-29
@@ -136,6 +136,9 @@ var ts;
|
||||
})(performance = ts.performance || (ts.performance = {}));
|
||||
})(ts || (ts = {}));
|
||||
var ts;
|
||||
(function (ts) {
|
||||
ts.version = "2.1.3";
|
||||
})(ts || (ts = {}));
|
||||
(function (ts) {
|
||||
var createObject = Object.create;
|
||||
ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined;
|
||||
@@ -606,7 +609,7 @@ var ts;
|
||||
if (value === undefined)
|
||||
return to;
|
||||
if (to === undefined)
|
||||
to = [];
|
||||
return [value];
|
||||
to.push(value);
|
||||
return to;
|
||||
}
|
||||
@@ -621,6 +624,14 @@ var ts;
|
||||
return to;
|
||||
}
|
||||
ts.addRange = addRange;
|
||||
function stableSort(array, comparer) {
|
||||
if (comparer === void 0) { comparer = compareValues; }
|
||||
return array
|
||||
.map(function (_, i) { return i; })
|
||||
.sort(function (x, y) { return comparer(array[x], array[y]) || compareValues(x, y); })
|
||||
.map(function (i) { return array[i]; });
|
||||
}
|
||||
ts.stableSort = stableSort;
|
||||
function rangeEquals(array1, array2, pos, end) {
|
||||
while (pos < end) {
|
||||
if (array1[pos] !== array2[pos]) {
|
||||
@@ -775,6 +786,15 @@ var ts;
|
||||
}
|
||||
}
|
||||
ts.copyProperties = copyProperties;
|
||||
function appendProperty(map, key, value) {
|
||||
if (key === undefined || value === undefined)
|
||||
return map;
|
||||
if (map === undefined)
|
||||
map = createMap();
|
||||
map[key] = value;
|
||||
return map;
|
||||
}
|
||||
ts.appendProperty = appendProperty;
|
||||
function assign(t) {
|
||||
var args = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
@@ -1227,6 +1247,14 @@ var ts;
|
||||
getEmitScriptTarget(compilerOptions) >= 2 ? ts.ModuleKind.ES2015 : ts.ModuleKind.CommonJS;
|
||||
}
|
||||
ts.getEmitModuleKind = getEmitModuleKind;
|
||||
function getEmitModuleResolutionKind(compilerOptions) {
|
||||
var moduleResolution = compilerOptions.moduleResolution;
|
||||
if (moduleResolution === undefined) {
|
||||
moduleResolution = getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
|
||||
}
|
||||
return moduleResolution;
|
||||
}
|
||||
ts.getEmitModuleResolutionKind = getEmitModuleResolutionKind;
|
||||
function hasZeroOrOneAsteriskCharacter(str) {
|
||||
var seenAsterisk = false;
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
@@ -1777,6 +1805,16 @@ var ts;
|
||||
}
|
||||
Debug.fail = fail;
|
||||
})(Debug = ts.Debug || (ts.Debug = {}));
|
||||
function orderedRemoveItem(array, item) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i] === item) {
|
||||
orderedRemoveItemAt(array, i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
ts.orderedRemoveItem = orderedRemoveItem;
|
||||
function orderedRemoveItemAt(array, index) {
|
||||
for (var i = index; i < array.length - 1; i++) {
|
||||
array[i] = array[i + 1];
|
||||
@@ -2876,7 +2914,7 @@ var ts;
|
||||
An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2697, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", message: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
|
||||
Spread_types_may_only_be_created_from_object_types: { code: 2698, category: ts.DiagnosticCategory.Error, key: "Spread_types_may_only_be_created_from_object_types_2698", message: "Spread types may only be created from object types." },
|
||||
Rest_types_may_only_be_created_from_object_types: { code: 2700, category: ts.DiagnosticCategory.Error, key: "Rest_types_may_only_be_created_from_object_types_2700", message: "Rest types may only be created from object types." },
|
||||
An_object_rest_element_must_be_an_identifier: { code: 2701, category: ts.DiagnosticCategory.Error, key: "An_object_rest_element_must_be_an_identifier_2701", message: "An object rest element must be an identifier." },
|
||||
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: { code: 2701, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", message: "The target of an object rest assignment must be a variable or a property access." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
@@ -3150,6 +3188,7 @@ var ts;
|
||||
type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", message: "'type assertion expressions' can only be used in a .ts file." },
|
||||
Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." },
|
||||
class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "class_expressions_are_not_currently_supported_9003", message: "'class' expressions are not currently supported." },
|
||||
Language_service_is_disabled: { code: 9004, category: ts.DiagnosticCategory.Error, key: "Language_service_is_disabled_9004", message: "Language service is disabled." },
|
||||
JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: ts.DiagnosticCategory.Error, key: "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", message: "JSX attributes must only be assigned a non-empty 'expression'." },
|
||||
JSX_elements_cannot_have_multiple_attributes_with_the_same_name: { code: 17001, category: ts.DiagnosticCategory.Error, key: "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", message: "JSX elements cannot have multiple attributes with the same name." },
|
||||
Expected_corresponding_JSX_closing_tag_for_0: { code: 17002, category: ts.DiagnosticCategory.Error, key: "Expected_corresponding_JSX_closing_tag_for_0_17002", message: "Expected corresponding JSX closing tag for '{0}'." },
|
||||
@@ -3162,7 +3201,7 @@ var ts;
|
||||
super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." },
|
||||
Unknown_typing_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_typing_option_0_17010", message: "Unknown typing option '{0}'." },
|
||||
Circularity_detected_while_resolving_configuration_Colon_0: { code: 18000, category: ts.DiagnosticCategory.Error, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", message: "Circularity detected while resolving configuration: {0}" },
|
||||
The_path_in_an_extends_options_must_be_relative_or_rooted: { code: 18001, category: ts.DiagnosticCategory.Error, key: "The_path_in_an_extends_options_must_be_relative_or_rooted_18001", message: "The path in an 'extends' options must be relative or rooted." },
|
||||
A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: { code: 18001, category: ts.DiagnosticCategory.Error, key: "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", message: "A path in an 'extends' option must be relative or rooted, but '{0}' is not." },
|
||||
The_files_list_in_config_file_0_is_empty: { code: 18002, category: ts.DiagnosticCategory.Error, key: "The_files_list_in_config_file_0_is_empty_18002", message: "The 'files' list in config file '{0}' is empty." },
|
||||
No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: { code: 18003, category: ts.DiagnosticCategory.Error, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", message: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'." },
|
||||
Add_missing_super_call: { code: 90001, category: ts.DiagnosticCategory.Message, key: "Add_missing_super_call_90001", message: "Add missing 'super()' call." },
|
||||
@@ -3174,6 +3213,9 @@ var ts;
|
||||
Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class" },
|
||||
Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig" },
|
||||
Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: { code: 90010, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010", message: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated." },
|
||||
Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}" },
|
||||
Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}" },
|
||||
Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}" },
|
||||
};
|
||||
})(ts || (ts = {}));
|
||||
var ts;
|
||||
@@ -5525,7 +5567,7 @@ var ts;
|
||||
};
|
||||
function tryExtendsName(extendedConfig) {
|
||||
if (!(ts.isRootedDiskPath(extendedConfig) || ts.startsWith(ts.normalizeSlashes(extendedConfig), "./") || ts.startsWith(ts.normalizeSlashes(extendedConfig), "../"))) {
|
||||
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.The_path_in_an_extends_options_must_be_relative_or_rooted));
|
||||
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extendedConfig));
|
||||
return;
|
||||
}
|
||||
var extendedConfigPath = ts.toPath(extendedConfig, basePath, getCanonicalFileName);
|
||||
@@ -6057,6 +6099,7 @@ var ts;
|
||||
function moduleHasNonRelativeName(moduleName) {
|
||||
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
|
||||
}
|
||||
ts.moduleHasNonRelativeName = moduleHasNonRelativeName;
|
||||
function tryReadTypesSection(extensions, packageJsonPath, baseDirectory, state) {
|
||||
var jsonContent = readJson(packageJsonPath, state.host);
|
||||
switch (extensions) {
|
||||
@@ -6618,9 +6661,17 @@ var ts;
|
||||
isEnabled: function () { return false; },
|
||||
writeLine: ts.noop
|
||||
};
|
||||
function typingToFileName(cachePath, packageName, installTypingHost) {
|
||||
var result = ts.resolveModuleName(packageName, ts.combinePaths(cachePath, "index.d.ts"), { moduleResolution: ts.ModuleResolutionKind.NodeJs }, installTypingHost);
|
||||
return result.resolvedModule && result.resolvedModule.resolvedFileName;
|
||||
function typingToFileName(cachePath, packageName, installTypingHost, log) {
|
||||
try {
|
||||
var result = ts.resolveModuleName(packageName, ts.combinePaths(cachePath, "index.d.ts"), { moduleResolution: ts.ModuleResolutionKind.NodeJs }, installTypingHost);
|
||||
return result.resolvedModule && result.resolvedModule.resolvedFileName;
|
||||
}
|
||||
catch (e) {
|
||||
if (log.isEnabled()) {
|
||||
log.writeLine("Failed to resolve " + packageName + " in folder '" + cachePath + "': " + e.message);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
var PackageNameValidationResult;
|
||||
(function (PackageNameValidationResult) {
|
||||
@@ -6749,8 +6800,9 @@ var ts;
|
||||
if (!packageName) {
|
||||
continue;
|
||||
}
|
||||
var typingFile = typingToFileName(cacheLocation, packageName, this.installTypingHost);
|
||||
var typingFile = typingToFileName(cacheLocation, packageName, this.installTypingHost, this.log);
|
||||
if (!typingFile) {
|
||||
this.missingTypingsSet[packageName] = true;
|
||||
continue;
|
||||
}
|
||||
var existingTypingFile = this.packageNameToTypingLocation[packageName];
|
||||
@@ -6781,7 +6833,7 @@ var ts;
|
||||
var result = [];
|
||||
for (var _i = 0, typingsToInstall_1 = typingsToInstall; _i < typingsToInstall_1.length; _i++) {
|
||||
var typing = typingsToInstall_1[_i];
|
||||
if (this.missingTypingsSet[typing]) {
|
||||
if (this.missingTypingsSet[typing] || this.packageNameToTypingLocation[typing]) {
|
||||
continue;
|
||||
}
|
||||
var validationResult = validatePackageName(typing);
|
||||
@@ -6857,7 +6909,8 @@ var ts;
|
||||
_this.sendResponse({
|
||||
kind: server.EventInstall,
|
||||
packagesToInstall: scopedTypings,
|
||||
installSuccess: ok
|
||||
installSuccess: ok,
|
||||
typingsInstallerVersion: ts.version
|
||||
});
|
||||
}
|
||||
if (!ok) {
|
||||
@@ -6871,17 +6924,14 @@ var ts;
|
||||
return;
|
||||
}
|
||||
if (_this.log.isEnabled()) {
|
||||
_this.log.writeLine("Requested to install typings " + JSON.stringify(scopedTypings) + ", installed typings " + JSON.stringify(scopedTypings));
|
||||
_this.log.writeLine("Installed typings " + JSON.stringify(scopedTypings));
|
||||
}
|
||||
var installedTypingFiles = [];
|
||||
for (var _a = 0, scopedTypings_1 = scopedTypings; _a < scopedTypings_1.length; _a++) {
|
||||
var t = scopedTypings_1[_a];
|
||||
var packageName = ts.getBaseFileName(t);
|
||||
if (!packageName) {
|
||||
continue;
|
||||
}
|
||||
var typingFile = typingToFileName(cachePath, packageName, _this.installTypingHost);
|
||||
for (var _a = 0, filteredTypings_2 = filteredTypings; _a < filteredTypings_2.length; _a++) {
|
||||
var packageName = filteredTypings_2[_a];
|
||||
var typingFile = typingToFileName(cachePath, packageName, _this.installTypingHost, _this.log);
|
||||
if (!typingFile) {
|
||||
_this.missingTypingsSet[packageName] = true;
|
||||
continue;
|
||||
}
|
||||
if (!_this.packageNameToTypingLocation[packageName]) {
|
||||
@@ -7021,14 +7071,13 @@ var ts;
|
||||
_this.log.writeLine("Process id: " + process.pid);
|
||||
}
|
||||
_this.npmPath = getNPMLocation(process.argv[0]);
|
||||
var execSync;
|
||||
(_a = require("child_process"), _this.exec = _a.exec, execSync = _a.execSync, _a);
|
||||
(_this.execSync = require("child_process").execSync);
|
||||
_this.ensurePackageDirectoryExists(globalTypingsCacheLocation);
|
||||
try {
|
||||
if (_this.log.isEnabled()) {
|
||||
_this.log.writeLine("Updating " + TypesRegistryPackageName + " npm package...");
|
||||
}
|
||||
execSync(_this.npmPath + " install " + TypesRegistryPackageName, { cwd: globalTypingsCacheLocation, stdio: "ignore" });
|
||||
_this.execSync(_this.npmPath + " install " + TypesRegistryPackageName, { cwd: globalTypingsCacheLocation, stdio: "ignore" });
|
||||
}
|
||||
catch (e) {
|
||||
if (_this.log.isEnabled()) {
|
||||
@@ -7037,7 +7086,6 @@ var ts;
|
||||
}
|
||||
_this.typesRegistry = loadTypesRegistryFile(getTypesRegistryFileLocation(globalTypingsCacheLocation), _this.installTypingHost, _this.log);
|
||||
return _this;
|
||||
var _a;
|
||||
}
|
||||
NodeTypingsInstaller.prototype.listen = function () {
|
||||
var _this = this;
|
||||
@@ -7061,18 +7109,26 @@ var ts;
|
||||
}
|
||||
};
|
||||
NodeTypingsInstaller.prototype.installWorker = function (requestId, args, cwd, onRequestCompleted) {
|
||||
var _this = this;
|
||||
if (this.log.isEnabled()) {
|
||||
this.log.writeLine("#" + requestId + " with arguments'" + JSON.stringify(args) + "'.");
|
||||
}
|
||||
var command = this.npmPath + " install " + args.join(" ") + " --save-dev";
|
||||
var start = Date.now();
|
||||
this.exec(command, { cwd: cwd }, function (err, stdout, stderr) {
|
||||
if (_this.log.isEnabled()) {
|
||||
_this.log.writeLine("npm install #" + requestId + " took: " + (Date.now() - start) + " ms" + ts.sys.newLine + "stdout: " + stdout + ts.sys.newLine + "stderr: " + stderr);
|
||||
}
|
||||
onRequestCompleted(!err);
|
||||
});
|
||||
var stdout;
|
||||
var stderr;
|
||||
var hasError = false;
|
||||
try {
|
||||
stdout = this.execSync(command, { cwd: cwd });
|
||||
}
|
||||
catch (e) {
|
||||
stdout = e.stdout;
|
||||
stderr = e.stderr;
|
||||
hasError = true;
|
||||
}
|
||||
if (this.log.isEnabled()) {
|
||||
this.log.writeLine("npm install #" + requestId + " took: " + (Date.now() - start) + " ms" + ts.sys.newLine + "stdout: " + (stdout && stdout.toString()) + ts.sys.newLine + "stderr: " + (stderr && stderr.toString()));
|
||||
}
|
||||
onRequestCompleted(!hasError);
|
||||
};
|
||||
return NodeTypingsInstaller;
|
||||
}(typingsInstaller.TypingsInstaller));
|
||||
|
||||
Reference in new issue
Block a user