mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into separateCompilation
This commit is contained in:
@@ -21,6 +21,7 @@ tests/services/baselines/local/*
|
||||
tests/baselines/prototyping/local/*
|
||||
tests/baselines/rwc/*
|
||||
tests/baselines/test262/*
|
||||
tests/baselines/local/projectOutput/*
|
||||
tests/services/baselines/prototyping/local/*
|
||||
tests/services/browser/typescriptServices.js
|
||||
scripts/processDiagnosticMessages.d.ts
|
||||
|
||||
@@ -254,8 +254,6 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
|
||||
options += " --stripInternal"
|
||||
}
|
||||
|
||||
options += " --cacheDownlevelForOfLength --preserveNewLines";
|
||||
|
||||
var cmd = host + " " + dir + compilerFilename + " " + options + " ";
|
||||
cmd = cmd + sources.join(" ");
|
||||
console.log(cmd + "\n");
|
||||
|
||||
Vendored
+14
@@ -1170,3 +1170,17 @@ interface ArrayConstructor {
|
||||
}
|
||||
|
||||
declare var Array: ArrayConstructor;
|
||||
|
||||
interface TypedPropertyDescriptor<T> {
|
||||
enumerable?: boolean;
|
||||
configurable?: boolean;
|
||||
writable?: boolean;
|
||||
value?: T;
|
||||
get?: () => T;
|
||||
set?: (value: T) => void;
|
||||
}
|
||||
|
||||
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
|
||||
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
|
||||
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
||||
declare type ParameterDecorator = (target: Function, propertyKey: string | symbol, parameterIndex: number) => void;
|
||||
|
||||
Vendored
+14
@@ -1170,6 +1170,20 @@ interface ArrayConstructor {
|
||||
}
|
||||
|
||||
declare var Array: ArrayConstructor;
|
||||
|
||||
interface TypedPropertyDescriptor<T> {
|
||||
enumerable?: boolean;
|
||||
configurable?: boolean;
|
||||
writable?: boolean;
|
||||
value?: T;
|
||||
get?: () => T;
|
||||
set?: (value: T) => void;
|
||||
}
|
||||
|
||||
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
|
||||
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
|
||||
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
||||
declare type ParameterDecorator = (target: Function, propertyKey: string | symbol, parameterIndex: number) => void;
|
||||
declare type PropertyKey = string | number | symbol;
|
||||
|
||||
interface Symbol {
|
||||
|
||||
Vendored
+14
@@ -1171,6 +1171,20 @@ interface ArrayConstructor {
|
||||
|
||||
declare var Array: ArrayConstructor;
|
||||
|
||||
interface TypedPropertyDescriptor<T> {
|
||||
enumerable?: boolean;
|
||||
configurable?: boolean;
|
||||
writable?: boolean;
|
||||
value?: T;
|
||||
get?: () => T;
|
||||
set?: (value: T) => void;
|
||||
}
|
||||
|
||||
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
|
||||
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
|
||||
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
||||
declare type ParameterDecorator = (target: Function, propertyKey: string | symbol, parameterIndex: number) => void;
|
||||
|
||||
/////////////////////////////
|
||||
/// IE10 ECMAScript Extensions
|
||||
/////////////////////////////
|
||||
|
||||
Vendored
+14
@@ -1170,6 +1170,20 @@ interface ArrayConstructor {
|
||||
}
|
||||
|
||||
declare var Array: ArrayConstructor;
|
||||
|
||||
interface TypedPropertyDescriptor<T> {
|
||||
enumerable?: boolean;
|
||||
configurable?: boolean;
|
||||
writable?: boolean;
|
||||
value?: T;
|
||||
get?: () => T;
|
||||
set?: (value: T) => void;
|
||||
}
|
||||
|
||||
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
|
||||
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
|
||||
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
||||
declare type ParameterDecorator = (target: Function, propertyKey: string | symbol, parameterIndex: number) => void;
|
||||
declare type PropertyKey = string | number | symbol;
|
||||
|
||||
interface Symbol {
|
||||
|
||||
+5212
-3913
File diff suppressed because it is too large
Load Diff
+8734
-6588
File diff suppressed because it is too large
Load Diff
Vendored
+226
-214
@@ -74,192 +74,195 @@ declare module "typescript" {
|
||||
BarBarToken = 49,
|
||||
QuestionToken = 50,
|
||||
ColonToken = 51,
|
||||
EqualsToken = 52,
|
||||
PlusEqualsToken = 53,
|
||||
MinusEqualsToken = 54,
|
||||
AsteriskEqualsToken = 55,
|
||||
SlashEqualsToken = 56,
|
||||
PercentEqualsToken = 57,
|
||||
LessThanLessThanEqualsToken = 58,
|
||||
GreaterThanGreaterThanEqualsToken = 59,
|
||||
GreaterThanGreaterThanGreaterThanEqualsToken = 60,
|
||||
AmpersandEqualsToken = 61,
|
||||
BarEqualsToken = 62,
|
||||
CaretEqualsToken = 63,
|
||||
Identifier = 64,
|
||||
BreakKeyword = 65,
|
||||
CaseKeyword = 66,
|
||||
CatchKeyword = 67,
|
||||
ClassKeyword = 68,
|
||||
ConstKeyword = 69,
|
||||
ContinueKeyword = 70,
|
||||
DebuggerKeyword = 71,
|
||||
DefaultKeyword = 72,
|
||||
DeleteKeyword = 73,
|
||||
DoKeyword = 74,
|
||||
ElseKeyword = 75,
|
||||
EnumKeyword = 76,
|
||||
ExportKeyword = 77,
|
||||
ExtendsKeyword = 78,
|
||||
FalseKeyword = 79,
|
||||
FinallyKeyword = 80,
|
||||
ForKeyword = 81,
|
||||
FunctionKeyword = 82,
|
||||
IfKeyword = 83,
|
||||
ImportKeyword = 84,
|
||||
InKeyword = 85,
|
||||
InstanceOfKeyword = 86,
|
||||
NewKeyword = 87,
|
||||
NullKeyword = 88,
|
||||
ReturnKeyword = 89,
|
||||
SuperKeyword = 90,
|
||||
SwitchKeyword = 91,
|
||||
ThisKeyword = 92,
|
||||
ThrowKeyword = 93,
|
||||
TrueKeyword = 94,
|
||||
TryKeyword = 95,
|
||||
TypeOfKeyword = 96,
|
||||
VarKeyword = 97,
|
||||
VoidKeyword = 98,
|
||||
WhileKeyword = 99,
|
||||
WithKeyword = 100,
|
||||
AsKeyword = 101,
|
||||
ImplementsKeyword = 102,
|
||||
InterfaceKeyword = 103,
|
||||
LetKeyword = 104,
|
||||
PackageKeyword = 105,
|
||||
PrivateKeyword = 106,
|
||||
ProtectedKeyword = 107,
|
||||
PublicKeyword = 108,
|
||||
StaticKeyword = 109,
|
||||
YieldKeyword = 110,
|
||||
AnyKeyword = 111,
|
||||
BooleanKeyword = 112,
|
||||
ConstructorKeyword = 113,
|
||||
DeclareKeyword = 114,
|
||||
GetKeyword = 115,
|
||||
ModuleKeyword = 116,
|
||||
RequireKeyword = 117,
|
||||
NumberKeyword = 118,
|
||||
SetKeyword = 119,
|
||||
StringKeyword = 120,
|
||||
SymbolKeyword = 121,
|
||||
TypeKeyword = 122,
|
||||
FromKeyword = 123,
|
||||
OfKeyword = 124,
|
||||
QualifiedName = 125,
|
||||
ComputedPropertyName = 126,
|
||||
TypeParameter = 127,
|
||||
Parameter = 128,
|
||||
PropertySignature = 129,
|
||||
PropertyDeclaration = 130,
|
||||
MethodSignature = 131,
|
||||
MethodDeclaration = 132,
|
||||
Constructor = 133,
|
||||
GetAccessor = 134,
|
||||
SetAccessor = 135,
|
||||
CallSignature = 136,
|
||||
ConstructSignature = 137,
|
||||
IndexSignature = 138,
|
||||
TypeReference = 139,
|
||||
FunctionType = 140,
|
||||
ConstructorType = 141,
|
||||
TypeQuery = 142,
|
||||
TypeLiteral = 143,
|
||||
ArrayType = 144,
|
||||
TupleType = 145,
|
||||
UnionType = 146,
|
||||
ParenthesizedType = 147,
|
||||
ObjectBindingPattern = 148,
|
||||
ArrayBindingPattern = 149,
|
||||
BindingElement = 150,
|
||||
ArrayLiteralExpression = 151,
|
||||
ObjectLiteralExpression = 152,
|
||||
PropertyAccessExpression = 153,
|
||||
ElementAccessExpression = 154,
|
||||
CallExpression = 155,
|
||||
NewExpression = 156,
|
||||
TaggedTemplateExpression = 157,
|
||||
TypeAssertionExpression = 158,
|
||||
ParenthesizedExpression = 159,
|
||||
FunctionExpression = 160,
|
||||
ArrowFunction = 161,
|
||||
DeleteExpression = 162,
|
||||
TypeOfExpression = 163,
|
||||
VoidExpression = 164,
|
||||
PrefixUnaryExpression = 165,
|
||||
PostfixUnaryExpression = 166,
|
||||
BinaryExpression = 167,
|
||||
ConditionalExpression = 168,
|
||||
TemplateExpression = 169,
|
||||
YieldExpression = 170,
|
||||
SpreadElementExpression = 171,
|
||||
OmittedExpression = 172,
|
||||
TemplateSpan = 173,
|
||||
Block = 174,
|
||||
VariableStatement = 175,
|
||||
EmptyStatement = 176,
|
||||
ExpressionStatement = 177,
|
||||
IfStatement = 178,
|
||||
DoStatement = 179,
|
||||
WhileStatement = 180,
|
||||
ForStatement = 181,
|
||||
ForInStatement = 182,
|
||||
ForOfStatement = 183,
|
||||
ContinueStatement = 184,
|
||||
BreakStatement = 185,
|
||||
ReturnStatement = 186,
|
||||
WithStatement = 187,
|
||||
SwitchStatement = 188,
|
||||
LabeledStatement = 189,
|
||||
ThrowStatement = 190,
|
||||
TryStatement = 191,
|
||||
DebuggerStatement = 192,
|
||||
VariableDeclaration = 193,
|
||||
VariableDeclarationList = 194,
|
||||
FunctionDeclaration = 195,
|
||||
ClassDeclaration = 196,
|
||||
InterfaceDeclaration = 197,
|
||||
TypeAliasDeclaration = 198,
|
||||
EnumDeclaration = 199,
|
||||
ModuleDeclaration = 200,
|
||||
ModuleBlock = 201,
|
||||
CaseBlock = 202,
|
||||
ImportEqualsDeclaration = 203,
|
||||
ImportDeclaration = 204,
|
||||
ImportClause = 205,
|
||||
NamespaceImport = 206,
|
||||
NamedImports = 207,
|
||||
ImportSpecifier = 208,
|
||||
ExportAssignment = 209,
|
||||
ExportDeclaration = 210,
|
||||
NamedExports = 211,
|
||||
ExportSpecifier = 212,
|
||||
ExternalModuleReference = 213,
|
||||
CaseClause = 214,
|
||||
DefaultClause = 215,
|
||||
HeritageClause = 216,
|
||||
CatchClause = 217,
|
||||
PropertyAssignment = 218,
|
||||
ShorthandPropertyAssignment = 219,
|
||||
EnumMember = 220,
|
||||
SourceFile = 221,
|
||||
SyntaxList = 222,
|
||||
Count = 223,
|
||||
FirstAssignment = 52,
|
||||
LastAssignment = 63,
|
||||
FirstReservedWord = 65,
|
||||
LastReservedWord = 100,
|
||||
FirstKeyword = 65,
|
||||
LastKeyword = 124,
|
||||
FirstFutureReservedWord = 102,
|
||||
LastFutureReservedWord = 110,
|
||||
FirstTypeNode = 139,
|
||||
LastTypeNode = 147,
|
||||
AtToken = 52,
|
||||
EqualsToken = 53,
|
||||
PlusEqualsToken = 54,
|
||||
MinusEqualsToken = 55,
|
||||
AsteriskEqualsToken = 56,
|
||||
SlashEqualsToken = 57,
|
||||
PercentEqualsToken = 58,
|
||||
LessThanLessThanEqualsToken = 59,
|
||||
GreaterThanGreaterThanEqualsToken = 60,
|
||||
GreaterThanGreaterThanGreaterThanEqualsToken = 61,
|
||||
AmpersandEqualsToken = 62,
|
||||
BarEqualsToken = 63,
|
||||
CaretEqualsToken = 64,
|
||||
Identifier = 65,
|
||||
BreakKeyword = 66,
|
||||
CaseKeyword = 67,
|
||||
CatchKeyword = 68,
|
||||
ClassKeyword = 69,
|
||||
ConstKeyword = 70,
|
||||
ContinueKeyword = 71,
|
||||
DebuggerKeyword = 72,
|
||||
DefaultKeyword = 73,
|
||||
DeleteKeyword = 74,
|
||||
DoKeyword = 75,
|
||||
ElseKeyword = 76,
|
||||
EnumKeyword = 77,
|
||||
ExportKeyword = 78,
|
||||
ExtendsKeyword = 79,
|
||||
FalseKeyword = 80,
|
||||
FinallyKeyword = 81,
|
||||
ForKeyword = 82,
|
||||
FunctionKeyword = 83,
|
||||
IfKeyword = 84,
|
||||
ImportKeyword = 85,
|
||||
InKeyword = 86,
|
||||
InstanceOfKeyword = 87,
|
||||
NewKeyword = 88,
|
||||
NullKeyword = 89,
|
||||
ReturnKeyword = 90,
|
||||
SuperKeyword = 91,
|
||||
SwitchKeyword = 92,
|
||||
ThisKeyword = 93,
|
||||
ThrowKeyword = 94,
|
||||
TrueKeyword = 95,
|
||||
TryKeyword = 96,
|
||||
TypeOfKeyword = 97,
|
||||
VarKeyword = 98,
|
||||
VoidKeyword = 99,
|
||||
WhileKeyword = 100,
|
||||
WithKeyword = 101,
|
||||
AsKeyword = 102,
|
||||
ImplementsKeyword = 103,
|
||||
InterfaceKeyword = 104,
|
||||
LetKeyword = 105,
|
||||
PackageKeyword = 106,
|
||||
PrivateKeyword = 107,
|
||||
ProtectedKeyword = 108,
|
||||
PublicKeyword = 109,
|
||||
StaticKeyword = 110,
|
||||
YieldKeyword = 111,
|
||||
AnyKeyword = 112,
|
||||
BooleanKeyword = 113,
|
||||
ConstructorKeyword = 114,
|
||||
DeclareKeyword = 115,
|
||||
GetKeyword = 116,
|
||||
ModuleKeyword = 117,
|
||||
RequireKeyword = 118,
|
||||
NumberKeyword = 119,
|
||||
SetKeyword = 120,
|
||||
StringKeyword = 121,
|
||||
SymbolKeyword = 122,
|
||||
TypeKeyword = 123,
|
||||
FromKeyword = 124,
|
||||
OfKeyword = 125,
|
||||
QualifiedName = 126,
|
||||
ComputedPropertyName = 127,
|
||||
TypeParameter = 128,
|
||||
Parameter = 129,
|
||||
Decorator = 130,
|
||||
PropertySignature = 131,
|
||||
PropertyDeclaration = 132,
|
||||
MethodSignature = 133,
|
||||
MethodDeclaration = 134,
|
||||
Constructor = 135,
|
||||
GetAccessor = 136,
|
||||
SetAccessor = 137,
|
||||
CallSignature = 138,
|
||||
ConstructSignature = 139,
|
||||
IndexSignature = 140,
|
||||
TypeReference = 141,
|
||||
FunctionType = 142,
|
||||
ConstructorType = 143,
|
||||
TypeQuery = 144,
|
||||
TypeLiteral = 145,
|
||||
ArrayType = 146,
|
||||
TupleType = 147,
|
||||
UnionType = 148,
|
||||
ParenthesizedType = 149,
|
||||
ObjectBindingPattern = 150,
|
||||
ArrayBindingPattern = 151,
|
||||
BindingElement = 152,
|
||||
ArrayLiteralExpression = 153,
|
||||
ObjectLiteralExpression = 154,
|
||||
PropertyAccessExpression = 155,
|
||||
ElementAccessExpression = 156,
|
||||
CallExpression = 157,
|
||||
NewExpression = 158,
|
||||
TaggedTemplateExpression = 159,
|
||||
TypeAssertionExpression = 160,
|
||||
ParenthesizedExpression = 161,
|
||||
FunctionExpression = 162,
|
||||
ArrowFunction = 163,
|
||||
DeleteExpression = 164,
|
||||
TypeOfExpression = 165,
|
||||
VoidExpression = 166,
|
||||
PrefixUnaryExpression = 167,
|
||||
PostfixUnaryExpression = 168,
|
||||
BinaryExpression = 169,
|
||||
ConditionalExpression = 170,
|
||||
TemplateExpression = 171,
|
||||
YieldExpression = 172,
|
||||
SpreadElementExpression = 173,
|
||||
OmittedExpression = 174,
|
||||
TemplateSpan = 175,
|
||||
Block = 176,
|
||||
VariableStatement = 177,
|
||||
EmptyStatement = 178,
|
||||
ExpressionStatement = 179,
|
||||
IfStatement = 180,
|
||||
DoStatement = 181,
|
||||
WhileStatement = 182,
|
||||
ForStatement = 183,
|
||||
ForInStatement = 184,
|
||||
ForOfStatement = 185,
|
||||
ContinueStatement = 186,
|
||||
BreakStatement = 187,
|
||||
ReturnStatement = 188,
|
||||
WithStatement = 189,
|
||||
SwitchStatement = 190,
|
||||
LabeledStatement = 191,
|
||||
ThrowStatement = 192,
|
||||
TryStatement = 193,
|
||||
DebuggerStatement = 194,
|
||||
VariableDeclaration = 195,
|
||||
VariableDeclarationList = 196,
|
||||
FunctionDeclaration = 197,
|
||||
ClassDeclaration = 198,
|
||||
InterfaceDeclaration = 199,
|
||||
TypeAliasDeclaration = 200,
|
||||
EnumDeclaration = 201,
|
||||
ModuleDeclaration = 202,
|
||||
ModuleBlock = 203,
|
||||
CaseBlock = 204,
|
||||
ImportEqualsDeclaration = 205,
|
||||
ImportDeclaration = 206,
|
||||
ImportClause = 207,
|
||||
NamespaceImport = 208,
|
||||
NamedImports = 209,
|
||||
ImportSpecifier = 210,
|
||||
ExportAssignment = 211,
|
||||
ExportDeclaration = 212,
|
||||
NamedExports = 213,
|
||||
ExportSpecifier = 214,
|
||||
MissingDeclaration = 215,
|
||||
ExternalModuleReference = 216,
|
||||
CaseClause = 217,
|
||||
DefaultClause = 218,
|
||||
HeritageClause = 219,
|
||||
CatchClause = 220,
|
||||
PropertyAssignment = 221,
|
||||
ShorthandPropertyAssignment = 222,
|
||||
EnumMember = 223,
|
||||
SourceFile = 224,
|
||||
SyntaxList = 225,
|
||||
Count = 226,
|
||||
FirstAssignment = 53,
|
||||
LastAssignment = 64,
|
||||
FirstReservedWord = 66,
|
||||
LastReservedWord = 101,
|
||||
FirstKeyword = 66,
|
||||
LastKeyword = 125,
|
||||
FirstFutureReservedWord = 103,
|
||||
LastFutureReservedWord = 111,
|
||||
FirstTypeNode = 141,
|
||||
LastTypeNode = 149,
|
||||
FirstPunctuation = 14,
|
||||
LastPunctuation = 63,
|
||||
LastPunctuation = 64,
|
||||
FirstToken = 0,
|
||||
LastToken = 124,
|
||||
LastToken = 125,
|
||||
FirstTriviaToken = 2,
|
||||
LastTriviaToken = 6,
|
||||
FirstLiteralToken = 7,
|
||||
@@ -267,8 +270,8 @@ declare module "typescript" {
|
||||
FirstTemplateToken = 10,
|
||||
LastTemplateToken = 13,
|
||||
FirstBinaryOperator = 24,
|
||||
LastBinaryOperator = 63,
|
||||
FirstNode = 125,
|
||||
LastBinaryOperator = 64,
|
||||
FirstNode = 126,
|
||||
}
|
||||
const enum NodeFlags {
|
||||
Export = 1,
|
||||
@@ -284,6 +287,7 @@ declare module "typescript" {
|
||||
Let = 4096,
|
||||
Const = 8192,
|
||||
OctalLiteral = 16384,
|
||||
ExportContext = 32768,
|
||||
Modifier = 499,
|
||||
AccessibilityModifier = 112,
|
||||
BlockScoped = 12288,
|
||||
@@ -293,10 +297,11 @@ declare module "typescript" {
|
||||
DisallowIn = 2,
|
||||
Yield = 4,
|
||||
GeneratorParameter = 8,
|
||||
ThisNodeHasError = 16,
|
||||
ParserGeneratedFlags = 31,
|
||||
ThisNodeOrAnySubNodesHasError = 32,
|
||||
HasAggregatedChildData = 64,
|
||||
Decorator = 16,
|
||||
ThisNodeHasError = 32,
|
||||
ParserGeneratedFlags = 63,
|
||||
ThisNodeOrAnySubNodesHasError = 64,
|
||||
HasAggregatedChildData = 128,
|
||||
}
|
||||
const enum RelationComparisonResult {
|
||||
Succeeded = 1,
|
||||
@@ -307,6 +312,7 @@ declare module "typescript" {
|
||||
kind: SyntaxKind;
|
||||
flags: NodeFlags;
|
||||
parserContextFlags?: ParserContextFlags;
|
||||
decorators?: NodeArray<Decorator>;
|
||||
modifiers?: ModifiersArray;
|
||||
id?: number;
|
||||
parent?: Node;
|
||||
@@ -337,6 +343,9 @@ declare module "typescript" {
|
||||
interface ComputedPropertyName extends Node {
|
||||
expression: Expression;
|
||||
}
|
||||
interface Decorator extends Node {
|
||||
expression: LeftHandSideExpression;
|
||||
}
|
||||
interface TypeParameterDeclaration extends Declaration {
|
||||
name: Identifier;
|
||||
constraint?: TypeNode;
|
||||
@@ -516,6 +525,9 @@ declare module "typescript" {
|
||||
name?: Identifier;
|
||||
body: Block | Expression;
|
||||
}
|
||||
interface ArrowFunction extends Expression, FunctionLikeDeclaration {
|
||||
equalsGreaterThanToken: Node;
|
||||
}
|
||||
interface LiteralExpression extends PrimaryExpression {
|
||||
text: string;
|
||||
isUnterminated?: boolean;
|
||||
@@ -725,7 +737,8 @@ declare module "typescript" {
|
||||
type ExportSpecifier = ImportOrExportSpecifier;
|
||||
interface ExportAssignment extends Declaration, ModuleElement {
|
||||
isExportEquals?: boolean;
|
||||
expression: Expression;
|
||||
expression?: Expression;
|
||||
type?: TypeNode;
|
||||
}
|
||||
interface FileReference extends TextRange {
|
||||
fileName: string;
|
||||
@@ -760,14 +773,14 @@ declare module "typescript" {
|
||||
interface Program extends ScriptReferenceHost {
|
||||
getSourceFiles(): SourceFile[];
|
||||
/**
|
||||
* Emits the javascript and declaration files. If targetSourceFile is not specified, then
|
||||
* the javascript and declaration files will be produced for all the files in this program.
|
||||
* If targetSourceFile is specified, then only the javascript and declaration for that
|
||||
* Emits the JavaScript and declaration files. If targetSourceFile is not specified, then
|
||||
* the JavaScript and declaration files will be produced for all the files in this program.
|
||||
* If targetSourceFile is specified, then only the JavaScript and declaration for that
|
||||
* specific file will be generated.
|
||||
*
|
||||
* If writeFile is not specified then the writeFile callback from the compiler host will be
|
||||
* used for writing the javascript and declaration files. Otherwise, the writeFile parameter
|
||||
* will be invoked when writing the javascript and declaration files.
|
||||
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
|
||||
* will be invoked when writing the JavaScript and declaration files.
|
||||
*/
|
||||
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult;
|
||||
getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[];
|
||||
@@ -886,9 +899,10 @@ declare module "typescript" {
|
||||
NotAccessible = 1,
|
||||
CannotBeNamed = 2,
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
interface SymbolVisibilityResult {
|
||||
accessibility: SymbolAccessibility;
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
errorSymbolName?: string;
|
||||
errorNode?: Node;
|
||||
}
|
||||
@@ -896,20 +910,22 @@ declare module "typescript" {
|
||||
errorModuleName?: string;
|
||||
}
|
||||
interface EmitResolver {
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
isReferencedAliasDeclaration(node: Node): boolean;
|
||||
hasGlobalName(name: string): boolean;
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
isValueAliasDeclaration(node: Node): boolean;
|
||||
isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean;
|
||||
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
|
||||
getNodeCheckFlags(node: Node): NodeCheckFlags;
|
||||
isDeclarationVisible(node: Declaration): boolean;
|
||||
collectLinkedAliases(node: Identifier): Node[];
|
||||
isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
|
||||
writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
|
||||
writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
|
||||
writeTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
@@ -1016,6 +1032,7 @@ declare module "typescript" {
|
||||
ContextChecked = 64,
|
||||
EnumValuesComputed = 128,
|
||||
BlockScopedBindingInLoop = 256,
|
||||
EmitDecorate = 512,
|
||||
}
|
||||
interface NodeLinks {
|
||||
resolvedType?: Type;
|
||||
@@ -1135,17 +1152,6 @@ declare module "typescript" {
|
||||
interface TypeMapper {
|
||||
(t: Type): Type;
|
||||
}
|
||||
interface TypeInferences {
|
||||
primary: Type[];
|
||||
secondary: Type[];
|
||||
}
|
||||
interface InferenceContext {
|
||||
typeParameters: TypeParameter[];
|
||||
inferUnionTypes: boolean;
|
||||
inferences: TypeInferences[];
|
||||
inferredTypes: Type[];
|
||||
failedTypeParameterIndex?: number;
|
||||
}
|
||||
interface DiagnosticMessage {
|
||||
key: string;
|
||||
category: DiagnosticCategory;
|
||||
@@ -1442,7 +1448,8 @@ declare module "typescript" {
|
||||
declare module "typescript" {
|
||||
/** The version of the TypeScript compiler release */
|
||||
let version: string;
|
||||
function createCompilerHost(options: CompilerOptions): CompilerHost;
|
||||
function findConfigFile(searchPath: string): string;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
function getPreEmitDiagnostics(program: Program): Diagnostic[];
|
||||
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
|
||||
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
|
||||
@@ -1556,6 +1563,7 @@ declare module "typescript" {
|
||||
getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[];
|
||||
getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[];
|
||||
getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[];
|
||||
findReferences(fileName: string, position: number): ReferencedSymbol[];
|
||||
getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[];
|
||||
getNavigationBarItems(fileName: string): NavigationBarItem[];
|
||||
getOutliningSpans(fileName: string): OutliningSpan[];
|
||||
@@ -1642,6 +1650,10 @@ declare module "typescript" {
|
||||
containerKind: string;
|
||||
containerName: string;
|
||||
}
|
||||
interface ReferencedSymbol {
|
||||
definition: DefinitionInfo;
|
||||
references: ReferenceEntry[];
|
||||
}
|
||||
enum SymbolDisplayPartKind {
|
||||
aliasName = 0,
|
||||
className = 1,
|
||||
|
||||
+8214
-6246
File diff suppressed because it is too large
Load Diff
Vendored
+226
-214
@@ -74,192 +74,195 @@ declare module ts {
|
||||
BarBarToken = 49,
|
||||
QuestionToken = 50,
|
||||
ColonToken = 51,
|
||||
EqualsToken = 52,
|
||||
PlusEqualsToken = 53,
|
||||
MinusEqualsToken = 54,
|
||||
AsteriskEqualsToken = 55,
|
||||
SlashEqualsToken = 56,
|
||||
PercentEqualsToken = 57,
|
||||
LessThanLessThanEqualsToken = 58,
|
||||
GreaterThanGreaterThanEqualsToken = 59,
|
||||
GreaterThanGreaterThanGreaterThanEqualsToken = 60,
|
||||
AmpersandEqualsToken = 61,
|
||||
BarEqualsToken = 62,
|
||||
CaretEqualsToken = 63,
|
||||
Identifier = 64,
|
||||
BreakKeyword = 65,
|
||||
CaseKeyword = 66,
|
||||
CatchKeyword = 67,
|
||||
ClassKeyword = 68,
|
||||
ConstKeyword = 69,
|
||||
ContinueKeyword = 70,
|
||||
DebuggerKeyword = 71,
|
||||
DefaultKeyword = 72,
|
||||
DeleteKeyword = 73,
|
||||
DoKeyword = 74,
|
||||
ElseKeyword = 75,
|
||||
EnumKeyword = 76,
|
||||
ExportKeyword = 77,
|
||||
ExtendsKeyword = 78,
|
||||
FalseKeyword = 79,
|
||||
FinallyKeyword = 80,
|
||||
ForKeyword = 81,
|
||||
FunctionKeyword = 82,
|
||||
IfKeyword = 83,
|
||||
ImportKeyword = 84,
|
||||
InKeyword = 85,
|
||||
InstanceOfKeyword = 86,
|
||||
NewKeyword = 87,
|
||||
NullKeyword = 88,
|
||||
ReturnKeyword = 89,
|
||||
SuperKeyword = 90,
|
||||
SwitchKeyword = 91,
|
||||
ThisKeyword = 92,
|
||||
ThrowKeyword = 93,
|
||||
TrueKeyword = 94,
|
||||
TryKeyword = 95,
|
||||
TypeOfKeyword = 96,
|
||||
VarKeyword = 97,
|
||||
VoidKeyword = 98,
|
||||
WhileKeyword = 99,
|
||||
WithKeyword = 100,
|
||||
AsKeyword = 101,
|
||||
ImplementsKeyword = 102,
|
||||
InterfaceKeyword = 103,
|
||||
LetKeyword = 104,
|
||||
PackageKeyword = 105,
|
||||
PrivateKeyword = 106,
|
||||
ProtectedKeyword = 107,
|
||||
PublicKeyword = 108,
|
||||
StaticKeyword = 109,
|
||||
YieldKeyword = 110,
|
||||
AnyKeyword = 111,
|
||||
BooleanKeyword = 112,
|
||||
ConstructorKeyword = 113,
|
||||
DeclareKeyword = 114,
|
||||
GetKeyword = 115,
|
||||
ModuleKeyword = 116,
|
||||
RequireKeyword = 117,
|
||||
NumberKeyword = 118,
|
||||
SetKeyword = 119,
|
||||
StringKeyword = 120,
|
||||
SymbolKeyword = 121,
|
||||
TypeKeyword = 122,
|
||||
FromKeyword = 123,
|
||||
OfKeyword = 124,
|
||||
QualifiedName = 125,
|
||||
ComputedPropertyName = 126,
|
||||
TypeParameter = 127,
|
||||
Parameter = 128,
|
||||
PropertySignature = 129,
|
||||
PropertyDeclaration = 130,
|
||||
MethodSignature = 131,
|
||||
MethodDeclaration = 132,
|
||||
Constructor = 133,
|
||||
GetAccessor = 134,
|
||||
SetAccessor = 135,
|
||||
CallSignature = 136,
|
||||
ConstructSignature = 137,
|
||||
IndexSignature = 138,
|
||||
TypeReference = 139,
|
||||
FunctionType = 140,
|
||||
ConstructorType = 141,
|
||||
TypeQuery = 142,
|
||||
TypeLiteral = 143,
|
||||
ArrayType = 144,
|
||||
TupleType = 145,
|
||||
UnionType = 146,
|
||||
ParenthesizedType = 147,
|
||||
ObjectBindingPattern = 148,
|
||||
ArrayBindingPattern = 149,
|
||||
BindingElement = 150,
|
||||
ArrayLiteralExpression = 151,
|
||||
ObjectLiteralExpression = 152,
|
||||
PropertyAccessExpression = 153,
|
||||
ElementAccessExpression = 154,
|
||||
CallExpression = 155,
|
||||
NewExpression = 156,
|
||||
TaggedTemplateExpression = 157,
|
||||
TypeAssertionExpression = 158,
|
||||
ParenthesizedExpression = 159,
|
||||
FunctionExpression = 160,
|
||||
ArrowFunction = 161,
|
||||
DeleteExpression = 162,
|
||||
TypeOfExpression = 163,
|
||||
VoidExpression = 164,
|
||||
PrefixUnaryExpression = 165,
|
||||
PostfixUnaryExpression = 166,
|
||||
BinaryExpression = 167,
|
||||
ConditionalExpression = 168,
|
||||
TemplateExpression = 169,
|
||||
YieldExpression = 170,
|
||||
SpreadElementExpression = 171,
|
||||
OmittedExpression = 172,
|
||||
TemplateSpan = 173,
|
||||
Block = 174,
|
||||
VariableStatement = 175,
|
||||
EmptyStatement = 176,
|
||||
ExpressionStatement = 177,
|
||||
IfStatement = 178,
|
||||
DoStatement = 179,
|
||||
WhileStatement = 180,
|
||||
ForStatement = 181,
|
||||
ForInStatement = 182,
|
||||
ForOfStatement = 183,
|
||||
ContinueStatement = 184,
|
||||
BreakStatement = 185,
|
||||
ReturnStatement = 186,
|
||||
WithStatement = 187,
|
||||
SwitchStatement = 188,
|
||||
LabeledStatement = 189,
|
||||
ThrowStatement = 190,
|
||||
TryStatement = 191,
|
||||
DebuggerStatement = 192,
|
||||
VariableDeclaration = 193,
|
||||
VariableDeclarationList = 194,
|
||||
FunctionDeclaration = 195,
|
||||
ClassDeclaration = 196,
|
||||
InterfaceDeclaration = 197,
|
||||
TypeAliasDeclaration = 198,
|
||||
EnumDeclaration = 199,
|
||||
ModuleDeclaration = 200,
|
||||
ModuleBlock = 201,
|
||||
CaseBlock = 202,
|
||||
ImportEqualsDeclaration = 203,
|
||||
ImportDeclaration = 204,
|
||||
ImportClause = 205,
|
||||
NamespaceImport = 206,
|
||||
NamedImports = 207,
|
||||
ImportSpecifier = 208,
|
||||
ExportAssignment = 209,
|
||||
ExportDeclaration = 210,
|
||||
NamedExports = 211,
|
||||
ExportSpecifier = 212,
|
||||
ExternalModuleReference = 213,
|
||||
CaseClause = 214,
|
||||
DefaultClause = 215,
|
||||
HeritageClause = 216,
|
||||
CatchClause = 217,
|
||||
PropertyAssignment = 218,
|
||||
ShorthandPropertyAssignment = 219,
|
||||
EnumMember = 220,
|
||||
SourceFile = 221,
|
||||
SyntaxList = 222,
|
||||
Count = 223,
|
||||
FirstAssignment = 52,
|
||||
LastAssignment = 63,
|
||||
FirstReservedWord = 65,
|
||||
LastReservedWord = 100,
|
||||
FirstKeyword = 65,
|
||||
LastKeyword = 124,
|
||||
FirstFutureReservedWord = 102,
|
||||
LastFutureReservedWord = 110,
|
||||
FirstTypeNode = 139,
|
||||
LastTypeNode = 147,
|
||||
AtToken = 52,
|
||||
EqualsToken = 53,
|
||||
PlusEqualsToken = 54,
|
||||
MinusEqualsToken = 55,
|
||||
AsteriskEqualsToken = 56,
|
||||
SlashEqualsToken = 57,
|
||||
PercentEqualsToken = 58,
|
||||
LessThanLessThanEqualsToken = 59,
|
||||
GreaterThanGreaterThanEqualsToken = 60,
|
||||
GreaterThanGreaterThanGreaterThanEqualsToken = 61,
|
||||
AmpersandEqualsToken = 62,
|
||||
BarEqualsToken = 63,
|
||||
CaretEqualsToken = 64,
|
||||
Identifier = 65,
|
||||
BreakKeyword = 66,
|
||||
CaseKeyword = 67,
|
||||
CatchKeyword = 68,
|
||||
ClassKeyword = 69,
|
||||
ConstKeyword = 70,
|
||||
ContinueKeyword = 71,
|
||||
DebuggerKeyword = 72,
|
||||
DefaultKeyword = 73,
|
||||
DeleteKeyword = 74,
|
||||
DoKeyword = 75,
|
||||
ElseKeyword = 76,
|
||||
EnumKeyword = 77,
|
||||
ExportKeyword = 78,
|
||||
ExtendsKeyword = 79,
|
||||
FalseKeyword = 80,
|
||||
FinallyKeyword = 81,
|
||||
ForKeyword = 82,
|
||||
FunctionKeyword = 83,
|
||||
IfKeyword = 84,
|
||||
ImportKeyword = 85,
|
||||
InKeyword = 86,
|
||||
InstanceOfKeyword = 87,
|
||||
NewKeyword = 88,
|
||||
NullKeyword = 89,
|
||||
ReturnKeyword = 90,
|
||||
SuperKeyword = 91,
|
||||
SwitchKeyword = 92,
|
||||
ThisKeyword = 93,
|
||||
ThrowKeyword = 94,
|
||||
TrueKeyword = 95,
|
||||
TryKeyword = 96,
|
||||
TypeOfKeyword = 97,
|
||||
VarKeyword = 98,
|
||||
VoidKeyword = 99,
|
||||
WhileKeyword = 100,
|
||||
WithKeyword = 101,
|
||||
AsKeyword = 102,
|
||||
ImplementsKeyword = 103,
|
||||
InterfaceKeyword = 104,
|
||||
LetKeyword = 105,
|
||||
PackageKeyword = 106,
|
||||
PrivateKeyword = 107,
|
||||
ProtectedKeyword = 108,
|
||||
PublicKeyword = 109,
|
||||
StaticKeyword = 110,
|
||||
YieldKeyword = 111,
|
||||
AnyKeyword = 112,
|
||||
BooleanKeyword = 113,
|
||||
ConstructorKeyword = 114,
|
||||
DeclareKeyword = 115,
|
||||
GetKeyword = 116,
|
||||
ModuleKeyword = 117,
|
||||
RequireKeyword = 118,
|
||||
NumberKeyword = 119,
|
||||
SetKeyword = 120,
|
||||
StringKeyword = 121,
|
||||
SymbolKeyword = 122,
|
||||
TypeKeyword = 123,
|
||||
FromKeyword = 124,
|
||||
OfKeyword = 125,
|
||||
QualifiedName = 126,
|
||||
ComputedPropertyName = 127,
|
||||
TypeParameter = 128,
|
||||
Parameter = 129,
|
||||
Decorator = 130,
|
||||
PropertySignature = 131,
|
||||
PropertyDeclaration = 132,
|
||||
MethodSignature = 133,
|
||||
MethodDeclaration = 134,
|
||||
Constructor = 135,
|
||||
GetAccessor = 136,
|
||||
SetAccessor = 137,
|
||||
CallSignature = 138,
|
||||
ConstructSignature = 139,
|
||||
IndexSignature = 140,
|
||||
TypeReference = 141,
|
||||
FunctionType = 142,
|
||||
ConstructorType = 143,
|
||||
TypeQuery = 144,
|
||||
TypeLiteral = 145,
|
||||
ArrayType = 146,
|
||||
TupleType = 147,
|
||||
UnionType = 148,
|
||||
ParenthesizedType = 149,
|
||||
ObjectBindingPattern = 150,
|
||||
ArrayBindingPattern = 151,
|
||||
BindingElement = 152,
|
||||
ArrayLiteralExpression = 153,
|
||||
ObjectLiteralExpression = 154,
|
||||
PropertyAccessExpression = 155,
|
||||
ElementAccessExpression = 156,
|
||||
CallExpression = 157,
|
||||
NewExpression = 158,
|
||||
TaggedTemplateExpression = 159,
|
||||
TypeAssertionExpression = 160,
|
||||
ParenthesizedExpression = 161,
|
||||
FunctionExpression = 162,
|
||||
ArrowFunction = 163,
|
||||
DeleteExpression = 164,
|
||||
TypeOfExpression = 165,
|
||||
VoidExpression = 166,
|
||||
PrefixUnaryExpression = 167,
|
||||
PostfixUnaryExpression = 168,
|
||||
BinaryExpression = 169,
|
||||
ConditionalExpression = 170,
|
||||
TemplateExpression = 171,
|
||||
YieldExpression = 172,
|
||||
SpreadElementExpression = 173,
|
||||
OmittedExpression = 174,
|
||||
TemplateSpan = 175,
|
||||
Block = 176,
|
||||
VariableStatement = 177,
|
||||
EmptyStatement = 178,
|
||||
ExpressionStatement = 179,
|
||||
IfStatement = 180,
|
||||
DoStatement = 181,
|
||||
WhileStatement = 182,
|
||||
ForStatement = 183,
|
||||
ForInStatement = 184,
|
||||
ForOfStatement = 185,
|
||||
ContinueStatement = 186,
|
||||
BreakStatement = 187,
|
||||
ReturnStatement = 188,
|
||||
WithStatement = 189,
|
||||
SwitchStatement = 190,
|
||||
LabeledStatement = 191,
|
||||
ThrowStatement = 192,
|
||||
TryStatement = 193,
|
||||
DebuggerStatement = 194,
|
||||
VariableDeclaration = 195,
|
||||
VariableDeclarationList = 196,
|
||||
FunctionDeclaration = 197,
|
||||
ClassDeclaration = 198,
|
||||
InterfaceDeclaration = 199,
|
||||
TypeAliasDeclaration = 200,
|
||||
EnumDeclaration = 201,
|
||||
ModuleDeclaration = 202,
|
||||
ModuleBlock = 203,
|
||||
CaseBlock = 204,
|
||||
ImportEqualsDeclaration = 205,
|
||||
ImportDeclaration = 206,
|
||||
ImportClause = 207,
|
||||
NamespaceImport = 208,
|
||||
NamedImports = 209,
|
||||
ImportSpecifier = 210,
|
||||
ExportAssignment = 211,
|
||||
ExportDeclaration = 212,
|
||||
NamedExports = 213,
|
||||
ExportSpecifier = 214,
|
||||
MissingDeclaration = 215,
|
||||
ExternalModuleReference = 216,
|
||||
CaseClause = 217,
|
||||
DefaultClause = 218,
|
||||
HeritageClause = 219,
|
||||
CatchClause = 220,
|
||||
PropertyAssignment = 221,
|
||||
ShorthandPropertyAssignment = 222,
|
||||
EnumMember = 223,
|
||||
SourceFile = 224,
|
||||
SyntaxList = 225,
|
||||
Count = 226,
|
||||
FirstAssignment = 53,
|
||||
LastAssignment = 64,
|
||||
FirstReservedWord = 66,
|
||||
LastReservedWord = 101,
|
||||
FirstKeyword = 66,
|
||||
LastKeyword = 125,
|
||||
FirstFutureReservedWord = 103,
|
||||
LastFutureReservedWord = 111,
|
||||
FirstTypeNode = 141,
|
||||
LastTypeNode = 149,
|
||||
FirstPunctuation = 14,
|
||||
LastPunctuation = 63,
|
||||
LastPunctuation = 64,
|
||||
FirstToken = 0,
|
||||
LastToken = 124,
|
||||
LastToken = 125,
|
||||
FirstTriviaToken = 2,
|
||||
LastTriviaToken = 6,
|
||||
FirstLiteralToken = 7,
|
||||
@@ -267,8 +270,8 @@ declare module ts {
|
||||
FirstTemplateToken = 10,
|
||||
LastTemplateToken = 13,
|
||||
FirstBinaryOperator = 24,
|
||||
LastBinaryOperator = 63,
|
||||
FirstNode = 125,
|
||||
LastBinaryOperator = 64,
|
||||
FirstNode = 126,
|
||||
}
|
||||
const enum NodeFlags {
|
||||
Export = 1,
|
||||
@@ -284,6 +287,7 @@ declare module ts {
|
||||
Let = 4096,
|
||||
Const = 8192,
|
||||
OctalLiteral = 16384,
|
||||
ExportContext = 32768,
|
||||
Modifier = 499,
|
||||
AccessibilityModifier = 112,
|
||||
BlockScoped = 12288,
|
||||
@@ -293,10 +297,11 @@ declare module ts {
|
||||
DisallowIn = 2,
|
||||
Yield = 4,
|
||||
GeneratorParameter = 8,
|
||||
ThisNodeHasError = 16,
|
||||
ParserGeneratedFlags = 31,
|
||||
ThisNodeOrAnySubNodesHasError = 32,
|
||||
HasAggregatedChildData = 64,
|
||||
Decorator = 16,
|
||||
ThisNodeHasError = 32,
|
||||
ParserGeneratedFlags = 63,
|
||||
ThisNodeOrAnySubNodesHasError = 64,
|
||||
HasAggregatedChildData = 128,
|
||||
}
|
||||
const enum RelationComparisonResult {
|
||||
Succeeded = 1,
|
||||
@@ -307,6 +312,7 @@ declare module ts {
|
||||
kind: SyntaxKind;
|
||||
flags: NodeFlags;
|
||||
parserContextFlags?: ParserContextFlags;
|
||||
decorators?: NodeArray<Decorator>;
|
||||
modifiers?: ModifiersArray;
|
||||
id?: number;
|
||||
parent?: Node;
|
||||
@@ -337,6 +343,9 @@ declare module ts {
|
||||
interface ComputedPropertyName extends Node {
|
||||
expression: Expression;
|
||||
}
|
||||
interface Decorator extends Node {
|
||||
expression: LeftHandSideExpression;
|
||||
}
|
||||
interface TypeParameterDeclaration extends Declaration {
|
||||
name: Identifier;
|
||||
constraint?: TypeNode;
|
||||
@@ -516,6 +525,9 @@ declare module ts {
|
||||
name?: Identifier;
|
||||
body: Block | Expression;
|
||||
}
|
||||
interface ArrowFunction extends Expression, FunctionLikeDeclaration {
|
||||
equalsGreaterThanToken: Node;
|
||||
}
|
||||
interface LiteralExpression extends PrimaryExpression {
|
||||
text: string;
|
||||
isUnterminated?: boolean;
|
||||
@@ -725,7 +737,8 @@ declare module ts {
|
||||
type ExportSpecifier = ImportOrExportSpecifier;
|
||||
interface ExportAssignment extends Declaration, ModuleElement {
|
||||
isExportEquals?: boolean;
|
||||
expression: Expression;
|
||||
expression?: Expression;
|
||||
type?: TypeNode;
|
||||
}
|
||||
interface FileReference extends TextRange {
|
||||
fileName: string;
|
||||
@@ -760,14 +773,14 @@ declare module ts {
|
||||
interface Program extends ScriptReferenceHost {
|
||||
getSourceFiles(): SourceFile[];
|
||||
/**
|
||||
* Emits the javascript and declaration files. If targetSourceFile is not specified, then
|
||||
* the javascript and declaration files will be produced for all the files in this program.
|
||||
* If targetSourceFile is specified, then only the javascript and declaration for that
|
||||
* Emits the JavaScript and declaration files. If targetSourceFile is not specified, then
|
||||
* the JavaScript and declaration files will be produced for all the files in this program.
|
||||
* If targetSourceFile is specified, then only the JavaScript and declaration for that
|
||||
* specific file will be generated.
|
||||
*
|
||||
* If writeFile is not specified then the writeFile callback from the compiler host will be
|
||||
* used for writing the javascript and declaration files. Otherwise, the writeFile parameter
|
||||
* will be invoked when writing the javascript and declaration files.
|
||||
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
|
||||
* will be invoked when writing the JavaScript and declaration files.
|
||||
*/
|
||||
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult;
|
||||
getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[];
|
||||
@@ -886,9 +899,10 @@ declare module ts {
|
||||
NotAccessible = 1,
|
||||
CannotBeNamed = 2,
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
interface SymbolVisibilityResult {
|
||||
accessibility: SymbolAccessibility;
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
errorSymbolName?: string;
|
||||
errorNode?: Node;
|
||||
}
|
||||
@@ -896,20 +910,22 @@ declare module ts {
|
||||
errorModuleName?: string;
|
||||
}
|
||||
interface EmitResolver {
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
isReferencedAliasDeclaration(node: Node): boolean;
|
||||
hasGlobalName(name: string): boolean;
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
isValueAliasDeclaration(node: Node): boolean;
|
||||
isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean;
|
||||
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
|
||||
getNodeCheckFlags(node: Node): NodeCheckFlags;
|
||||
isDeclarationVisible(node: Declaration): boolean;
|
||||
collectLinkedAliases(node: Identifier): Node[];
|
||||
isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
|
||||
writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
|
||||
writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
|
||||
writeTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void;
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
@@ -1016,6 +1032,7 @@ declare module ts {
|
||||
ContextChecked = 64,
|
||||
EnumValuesComputed = 128,
|
||||
BlockScopedBindingInLoop = 256,
|
||||
EmitDecorate = 512,
|
||||
}
|
||||
interface NodeLinks {
|
||||
resolvedType?: Type;
|
||||
@@ -1135,17 +1152,6 @@ declare module ts {
|
||||
interface TypeMapper {
|
||||
(t: Type): Type;
|
||||
}
|
||||
interface TypeInferences {
|
||||
primary: Type[];
|
||||
secondary: Type[];
|
||||
}
|
||||
interface InferenceContext {
|
||||
typeParameters: TypeParameter[];
|
||||
inferUnionTypes: boolean;
|
||||
inferences: TypeInferences[];
|
||||
inferredTypes: Type[];
|
||||
failedTypeParameterIndex?: number;
|
||||
}
|
||||
interface DiagnosticMessage {
|
||||
key: string;
|
||||
category: DiagnosticCategory;
|
||||
@@ -1442,7 +1448,8 @@ declare module ts {
|
||||
declare module ts {
|
||||
/** The version of the TypeScript compiler release */
|
||||
let version: string;
|
||||
function createCompilerHost(options: CompilerOptions): CompilerHost;
|
||||
function findConfigFile(searchPath: string): string;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
function getPreEmitDiagnostics(program: Program): Diagnostic[];
|
||||
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
|
||||
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
|
||||
@@ -1556,6 +1563,7 @@ declare module ts {
|
||||
getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[];
|
||||
getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[];
|
||||
getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[];
|
||||
findReferences(fileName: string, position: number): ReferencedSymbol[];
|
||||
getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[];
|
||||
getNavigationBarItems(fileName: string): NavigationBarItem[];
|
||||
getOutliningSpans(fileName: string): OutliningSpan[];
|
||||
@@ -1642,6 +1650,10 @@ declare module ts {
|
||||
containerKind: string;
|
||||
containerName: string;
|
||||
}
|
||||
interface ReferencedSymbol {
|
||||
definition: DefinitionInfo;
|
||||
references: ReferenceEntry[];
|
||||
}
|
||||
enum SymbolDisplayPartKind {
|
||||
aliasName = 0,
|
||||
className = 1,
|
||||
|
||||
+8214
-6246
File diff suppressed because it is too large
Load Diff
Vendored
+49
-3
@@ -41,6 +41,10 @@ declare module ts {
|
||||
*/
|
||||
function lastOrUndefined<T>(array: T[]): T;
|
||||
function binarySearch(array: number[], value: number): number;
|
||||
function reduceLeft<T>(array: T[], f: (a: T, x: T) => T): T;
|
||||
function reduceLeft<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
|
||||
function reduceRight<T>(array: T[], f: (a: T, x: T) => T): T;
|
||||
function reduceRight<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
|
||||
function hasProperty<T>(map: Map<T>, key: string): boolean;
|
||||
function getProperty<T>(map: Map<T>, key: string): T;
|
||||
function isEmpty<T>(map: Map<T>): boolean;
|
||||
@@ -49,7 +53,6 @@ declare module ts {
|
||||
function forEachValue<T, U>(map: Map<T>, callback: (value: T) => U): U;
|
||||
function forEachKey<T, U>(map: Map<T>, callback: (key: string) => U): U;
|
||||
function lookUp<T>(map: Map<T>, key: string): T;
|
||||
function mapToArray<T>(map: Map<T>): T[];
|
||||
function copyMap<T>(source: Map<T>, target: Map<T>): void;
|
||||
/**
|
||||
* Creates a map from the elements of an array.
|
||||
@@ -184,7 +187,7 @@ declare module ts {
|
||||
function isConst(node: Node): boolean;
|
||||
function isLet(node: Node): boolean;
|
||||
function isPrologueDirective(node: Node): boolean;
|
||||
function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile): CommentRange[];
|
||||
function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
|
||||
function getJsDocComments(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
|
||||
let fullTripleSlashReferencePathRegEx: RegExp;
|
||||
function forEachReturnStatement<T>(body: Block, visitor: (stmt: ReturnStatement) => T): T;
|
||||
@@ -195,6 +198,10 @@ declare module ts {
|
||||
function getThisContainer(node: Node, includeArrowFunctions: boolean): Node;
|
||||
function getSuperContainer(node: Node, includeFunctions: boolean): Node;
|
||||
function getInvokedExpression(node: CallLikeExpression): Expression;
|
||||
function nodeCanBeDecorated(node: Node): boolean;
|
||||
function nodeIsDecorated(node: Node): boolean;
|
||||
function childIsDecorated(node: Node): boolean;
|
||||
function nodeOrChildIsDecorated(node: Node): boolean;
|
||||
function isExpression(node: Node): boolean;
|
||||
function isInstantiatedModule(node: ModuleDeclaration, preserveConstEnums: boolean): boolean;
|
||||
function isExternalModuleImportEqualsDeclaration(node: Node): boolean;
|
||||
@@ -211,7 +218,9 @@ declare module ts {
|
||||
function isInAmbientContext(node: Node): boolean;
|
||||
function isDeclaration(node: Node): boolean;
|
||||
function isStatement(n: Node): boolean;
|
||||
function isClassElement(n: Node): boolean;
|
||||
function isDeclarationName(name: Node): boolean;
|
||||
function isAliasSymbolDeclaration(node: Node): boolean;
|
||||
function getClassBaseTypeNode(node: ClassDeclaration): TypeReferenceNode;
|
||||
function getClassImplementedTypeNodes(node: ClassDeclaration): NodeArray<TypeReferenceNode>;
|
||||
function getInterfaceBaseTypeNodes(node: InterfaceDeclaration): NodeArray<TypeReferenceNode>;
|
||||
@@ -270,7 +279,6 @@ declare module ts {
|
||||
function nodeStartsNewLexicalEnvironment(n: Node): boolean;
|
||||
function nodeIsSynthesized(node: Node): boolean;
|
||||
function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node;
|
||||
function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string;
|
||||
/**
|
||||
* Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2),
|
||||
* but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine)
|
||||
@@ -278,6 +286,38 @@ declare module ts {
|
||||
*/
|
||||
function escapeString(s: string): string;
|
||||
function escapeNonAsciiCharacters(s: string): string;
|
||||
interface EmitTextWriter {
|
||||
write(s: string): void;
|
||||
writeTextOfNode(sourceFile: SourceFile, node: Node): void;
|
||||
writeLine(): void;
|
||||
increaseIndent(): void;
|
||||
decreaseIndent(): void;
|
||||
getText(): string;
|
||||
rawWrite(s: string): void;
|
||||
writeLiteral(s: string): void;
|
||||
getTextPos(): number;
|
||||
getLine(): number;
|
||||
getColumn(): number;
|
||||
getIndent(): number;
|
||||
}
|
||||
function getIndentString(level: number): string;
|
||||
function getIndentSize(): number;
|
||||
function createTextWriter(newLine: String): EmitTextWriter;
|
||||
function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string): string;
|
||||
function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string): string;
|
||||
function writeFile(host: EmitHost, diagnostics: Diagnostic[], fileName: string, data: string, writeByteOrderMark: boolean): void;
|
||||
function getLineOfLocalPosition(currentSourceFile: SourceFile, pos: number): number;
|
||||
function getFirstConstructorWithBody(node: ClassDeclaration): ConstructorDeclaration;
|
||||
function shouldEmitToOwnFile(sourceFile: SourceFile, compilerOptions: CompilerOptions): boolean;
|
||||
function getAllAccessorDeclarations(declarations: NodeArray<Declaration>, accessor: AccessorDeclaration): {
|
||||
firstAccessor: AccessorDeclaration;
|
||||
secondAccessor: AccessorDeclaration;
|
||||
getAccessor: AccessorDeclaration;
|
||||
setAccessor: AccessorDeclaration;
|
||||
};
|
||||
function emitNewLineBeforeLeadingComments(currentSourceFile: SourceFile, writer: EmitTextWriter, node: TextRange, leadingComments: CommentRange[]): void;
|
||||
function emitComments(currentSourceFile: SourceFile, writer: EmitTextWriter, comments: CommentRange[], trailingSeparator: boolean, newLine: string, writeComment: (currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string) => void): void;
|
||||
function writeCommentRange(currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string): void;
|
||||
}
|
||||
declare module ts {
|
||||
var optionDeclarations: CommandLineOption[];
|
||||
@@ -297,7 +337,10 @@ declare module ts {
|
||||
function rangeContainsStartEnd(range: TextRange, start: number, end: number): boolean;
|
||||
function rangeOverlapsWithStartEnd(r1: TextRange, start: number, end: number): boolean;
|
||||
function startEndOverlapsWithStartEnd(start1: number, end1: number, start2: number, end2: number): boolean;
|
||||
function positionBelongsToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean;
|
||||
function isCompletedNode(n: Node, sourceFile: SourceFile): boolean;
|
||||
function findListItemInfo(node: Node): ListItemInfo;
|
||||
function hasChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): boolean;
|
||||
function findChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): Node;
|
||||
function findContainingList(node: Node): Node;
|
||||
function getTouchingWord(sourceFile: SourceFile, position: number): Node;
|
||||
@@ -320,9 +363,11 @@ declare module ts {
|
||||
function getNodeModifiers(node: Node): string;
|
||||
function getTypeArgumentOrTypeParameterList(node: Node): NodeArray<Node>;
|
||||
function isToken(n: Node): boolean;
|
||||
function isWord(kind: SyntaxKind): boolean;
|
||||
function isComment(kind: SyntaxKind): boolean;
|
||||
function isPunctuation(kind: SyntaxKind): boolean;
|
||||
function isInsideTemplateLiteral(node: LiteralExpression, position: number): boolean;
|
||||
function isAccessibilityModifier(kind: SyntaxKind): boolean;
|
||||
function compareDataObjects(dst: any, src: any): boolean;
|
||||
}
|
||||
declare module ts {
|
||||
@@ -333,6 +378,7 @@ declare module ts {
|
||||
function keywordPart(kind: SyntaxKind): SymbolDisplayPart;
|
||||
function punctuationPart(kind: SyntaxKind): SymbolDisplayPart;
|
||||
function operatorPart(kind: SyntaxKind): SymbolDisplayPart;
|
||||
function textOrKeywordPart(text: string): SymbolDisplayPart;
|
||||
function textPart(text: string): SymbolDisplayPart;
|
||||
function lineBreakPart(): SymbolDisplayPart;
|
||||
function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[];
|
||||
|
||||
Vendored
+49
-3
@@ -41,6 +41,10 @@ declare module "typescript" {
|
||||
*/
|
||||
function lastOrUndefined<T>(array: T[]): T;
|
||||
function binarySearch(array: number[], value: number): number;
|
||||
function reduceLeft<T>(array: T[], f: (a: T, x: T) => T): T;
|
||||
function reduceLeft<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
|
||||
function reduceRight<T>(array: T[], f: (a: T, x: T) => T): T;
|
||||
function reduceRight<T, U>(array: T[], f: (a: U, x: T) => U, initial: U): U;
|
||||
function hasProperty<T>(map: Map<T>, key: string): boolean;
|
||||
function getProperty<T>(map: Map<T>, key: string): T;
|
||||
function isEmpty<T>(map: Map<T>): boolean;
|
||||
@@ -49,7 +53,6 @@ declare module "typescript" {
|
||||
function forEachValue<T, U>(map: Map<T>, callback: (value: T) => U): U;
|
||||
function forEachKey<T, U>(map: Map<T>, callback: (key: string) => U): U;
|
||||
function lookUp<T>(map: Map<T>, key: string): T;
|
||||
function mapToArray<T>(map: Map<T>): T[];
|
||||
function copyMap<T>(source: Map<T>, target: Map<T>): void;
|
||||
/**
|
||||
* Creates a map from the elements of an array.
|
||||
@@ -184,7 +187,7 @@ declare module "typescript" {
|
||||
function isConst(node: Node): boolean;
|
||||
function isLet(node: Node): boolean;
|
||||
function isPrologueDirective(node: Node): boolean;
|
||||
function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile): CommentRange[];
|
||||
function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
|
||||
function getJsDocComments(node: Node, sourceFileOfNode: SourceFile): CommentRange[];
|
||||
let fullTripleSlashReferencePathRegEx: RegExp;
|
||||
function forEachReturnStatement<T>(body: Block, visitor: (stmt: ReturnStatement) => T): T;
|
||||
@@ -195,6 +198,10 @@ declare module "typescript" {
|
||||
function getThisContainer(node: Node, includeArrowFunctions: boolean): Node;
|
||||
function getSuperContainer(node: Node, includeFunctions: boolean): Node;
|
||||
function getInvokedExpression(node: CallLikeExpression): Expression;
|
||||
function nodeCanBeDecorated(node: Node): boolean;
|
||||
function nodeIsDecorated(node: Node): boolean;
|
||||
function childIsDecorated(node: Node): boolean;
|
||||
function nodeOrChildIsDecorated(node: Node): boolean;
|
||||
function isExpression(node: Node): boolean;
|
||||
function isInstantiatedModule(node: ModuleDeclaration, preserveConstEnums: boolean): boolean;
|
||||
function isExternalModuleImportEqualsDeclaration(node: Node): boolean;
|
||||
@@ -211,7 +218,9 @@ declare module "typescript" {
|
||||
function isInAmbientContext(node: Node): boolean;
|
||||
function isDeclaration(node: Node): boolean;
|
||||
function isStatement(n: Node): boolean;
|
||||
function isClassElement(n: Node): boolean;
|
||||
function isDeclarationName(name: Node): boolean;
|
||||
function isAliasSymbolDeclaration(node: Node): boolean;
|
||||
function getClassBaseTypeNode(node: ClassDeclaration): TypeReferenceNode;
|
||||
function getClassImplementedTypeNodes(node: ClassDeclaration): NodeArray<TypeReferenceNode>;
|
||||
function getInterfaceBaseTypeNodes(node: InterfaceDeclaration): NodeArray<TypeReferenceNode>;
|
||||
@@ -270,7 +279,6 @@ declare module "typescript" {
|
||||
function nodeStartsNewLexicalEnvironment(n: Node): boolean;
|
||||
function nodeIsSynthesized(node: Node): boolean;
|
||||
function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node;
|
||||
function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string;
|
||||
/**
|
||||
* Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2),
|
||||
* but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine)
|
||||
@@ -278,6 +286,38 @@ declare module "typescript" {
|
||||
*/
|
||||
function escapeString(s: string): string;
|
||||
function escapeNonAsciiCharacters(s: string): string;
|
||||
interface EmitTextWriter {
|
||||
write(s: string): void;
|
||||
writeTextOfNode(sourceFile: SourceFile, node: Node): void;
|
||||
writeLine(): void;
|
||||
increaseIndent(): void;
|
||||
decreaseIndent(): void;
|
||||
getText(): string;
|
||||
rawWrite(s: string): void;
|
||||
writeLiteral(s: string): void;
|
||||
getTextPos(): number;
|
||||
getLine(): number;
|
||||
getColumn(): number;
|
||||
getIndent(): number;
|
||||
}
|
||||
function getIndentString(level: number): string;
|
||||
function getIndentSize(): number;
|
||||
function createTextWriter(newLine: String): EmitTextWriter;
|
||||
function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string): string;
|
||||
function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string): string;
|
||||
function writeFile(host: EmitHost, diagnostics: Diagnostic[], fileName: string, data: string, writeByteOrderMark: boolean): void;
|
||||
function getLineOfLocalPosition(currentSourceFile: SourceFile, pos: number): number;
|
||||
function getFirstConstructorWithBody(node: ClassDeclaration): ConstructorDeclaration;
|
||||
function shouldEmitToOwnFile(sourceFile: SourceFile, compilerOptions: CompilerOptions): boolean;
|
||||
function getAllAccessorDeclarations(declarations: NodeArray<Declaration>, accessor: AccessorDeclaration): {
|
||||
firstAccessor: AccessorDeclaration;
|
||||
secondAccessor: AccessorDeclaration;
|
||||
getAccessor: AccessorDeclaration;
|
||||
setAccessor: AccessorDeclaration;
|
||||
};
|
||||
function emitNewLineBeforeLeadingComments(currentSourceFile: SourceFile, writer: EmitTextWriter, node: TextRange, leadingComments: CommentRange[]): void;
|
||||
function emitComments(currentSourceFile: SourceFile, writer: EmitTextWriter, comments: CommentRange[], trailingSeparator: boolean, newLine: string, writeComment: (currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string) => void): void;
|
||||
function writeCommentRange(currentSourceFile: SourceFile, writer: EmitTextWriter, comment: CommentRange, newLine: string): void;
|
||||
}
|
||||
declare module "typescript" {
|
||||
var optionDeclarations: CommandLineOption[];
|
||||
@@ -297,7 +337,10 @@ declare module "typescript" {
|
||||
function rangeContainsStartEnd(range: TextRange, start: number, end: number): boolean;
|
||||
function rangeOverlapsWithStartEnd(r1: TextRange, start: number, end: number): boolean;
|
||||
function startEndOverlapsWithStartEnd(start1: number, end1: number, start2: number, end2: number): boolean;
|
||||
function positionBelongsToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean;
|
||||
function isCompletedNode(n: Node, sourceFile: SourceFile): boolean;
|
||||
function findListItemInfo(node: Node): ListItemInfo;
|
||||
function hasChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): boolean;
|
||||
function findChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): Node;
|
||||
function findContainingList(node: Node): Node;
|
||||
function getTouchingWord(sourceFile: SourceFile, position: number): Node;
|
||||
@@ -320,9 +363,11 @@ declare module "typescript" {
|
||||
function getNodeModifiers(node: Node): string;
|
||||
function getTypeArgumentOrTypeParameterList(node: Node): NodeArray<Node>;
|
||||
function isToken(n: Node): boolean;
|
||||
function isWord(kind: SyntaxKind): boolean;
|
||||
function isComment(kind: SyntaxKind): boolean;
|
||||
function isPunctuation(kind: SyntaxKind): boolean;
|
||||
function isInsideTemplateLiteral(node: LiteralExpression, position: number): boolean;
|
||||
function isAccessibilityModifier(kind: SyntaxKind): boolean;
|
||||
function compareDataObjects(dst: any, src: any): boolean;
|
||||
}
|
||||
declare module "typescript" {
|
||||
@@ -333,6 +378,7 @@ declare module "typescript" {
|
||||
function keywordPart(kind: SyntaxKind): SymbolDisplayPart;
|
||||
function punctuationPart(kind: SyntaxKind): SymbolDisplayPart;
|
||||
function operatorPart(kind: SyntaxKind): SymbolDisplayPart;
|
||||
function textOrKeywordPart(text: string): SymbolDisplayPart;
|
||||
function textPart(text: string): SymbolDisplayPart;
|
||||
function lineBreakPart(): SymbolDisplayPart;
|
||||
function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[];
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+1
-1
@@ -545,7 +545,7 @@ class CheckingAccount extends BankAccount {
|
||||
}
|
||||
```
|
||||
|
||||
In this example, the class 'CheckingAccount' *derives* from class 'BankAccount'. The constructor for 'CheckingAccount' calls the constructor for class 'BankAccount' using the 'super' keyword. In the emitted JavaScript code, the prototype of 'CheckingAccount' will chain to the prototype of 'BankingAccount'.
|
||||
In this example, the class 'CheckingAccount' *derives* from class 'BankAccount'. The constructor for 'CheckingAccount' calls the constructor for class 'BankAccount' using the 'super' keyword. In the emitted JavaScript code, the prototype of 'CheckingAccount' will chain to the prototype of 'BankAccount'.
|
||||
|
||||
TypeScript classes may also specify static members. Static class members become properties of the class constructor.
|
||||
|
||||
|
||||
@@ -3878,6 +3878,7 @@ module ts {
|
||||
let expandingFlags: number;
|
||||
let depth = 0;
|
||||
let overflow = false;
|
||||
let elaborateErrors = false;
|
||||
|
||||
Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
|
||||
|
||||
@@ -3892,7 +3893,8 @@ module ts {
|
||||
// where errors were being reported.
|
||||
if (errorInfo.next === undefined) {
|
||||
errorInfo = undefined;
|
||||
isRelatedTo(source, target, errorNode !== undefined, headMessage, /* elaborateErrors */ true);
|
||||
elaborateErrors = true;
|
||||
isRelatedTo(source, target, errorNode !== undefined, headMessage);
|
||||
}
|
||||
if (containingMessageChain) {
|
||||
errorInfo = concatenateDiagnosticMessageChains(containingMessageChain, errorInfo);
|
||||
@@ -3910,7 +3912,7 @@ module ts {
|
||||
// Ternary.True if they are related with no assumptions,
|
||||
// Ternary.Maybe if they are related with assumptions of other relationships, or
|
||||
// Ternary.False if they are not related.
|
||||
function isRelatedTo(source: Type, target: Type, reportErrors?: boolean, headMessage?: DiagnosticMessage, elaborateErrors = false): Ternary {
|
||||
function isRelatedTo(source: Type, target: Type, reportErrors?: boolean, headMessage?: DiagnosticMessage): Ternary {
|
||||
let result: Ternary;
|
||||
// both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases
|
||||
if (source === target) return Ternary.True;
|
||||
@@ -3977,7 +3979,7 @@ module ts {
|
||||
// identity relation does not use apparent type
|
||||
let sourceOrApparentType = relation === identityRelation ? source : getApparentType(source);
|
||||
if (sourceOrApparentType.flags & TypeFlags.ObjectType && target.flags & TypeFlags.ObjectType &&
|
||||
(result = objectTypeRelatedTo(sourceOrApparentType, <ObjectType>target, reportStructuralErrors, elaborateErrors))) {
|
||||
(result = objectTypeRelatedTo(sourceOrApparentType, <ObjectType>target, reportStructuralErrors))) {
|
||||
errorInfo = saveErrorInfo;
|
||||
return result;
|
||||
}
|
||||
@@ -4074,7 +4076,7 @@ module ts {
|
||||
// Third, check if both types are part of deeply nested chains of generic type instantiations and if so assume the types are
|
||||
// equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion
|
||||
// and issue an error. Otherwise, actually compare the structure of the two types.
|
||||
function objectTypeRelatedTo(source: ObjectType, target: ObjectType, reportErrors: boolean, elaborateErrors = false): Ternary {
|
||||
function objectTypeRelatedTo(source: ObjectType, target: ObjectType, reportErrors: boolean): Ternary {
|
||||
if (overflow) {
|
||||
return Ternary.False;
|
||||
}
|
||||
|
||||
@@ -140,18 +140,6 @@ module ts {
|
||||
description: Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
|
||||
experimental: true
|
||||
},
|
||||
{
|
||||
name: "preserveNewLines",
|
||||
type: "boolean",
|
||||
description: Diagnostics.Preserve_new_lines_when_emitting_code,
|
||||
experimental: true
|
||||
},
|
||||
{
|
||||
name: "cacheDownlevelForOfLength",
|
||||
type: "boolean",
|
||||
description: "Cache length access when downlevel emitting for-of statements",
|
||||
experimental: true,
|
||||
},
|
||||
{
|
||||
name: "target",
|
||||
shortName: "t",
|
||||
|
||||
+140
-239
@@ -12,12 +12,12 @@ module ts {
|
||||
return isExternalModule(sourceFile) || isDeclarationFile(sourceFile);
|
||||
}
|
||||
|
||||
// flag enum used to request and track usages of few dedicated temp variables
|
||||
// enum values are used to set/check bit values and thus should not have bit collisions.
|
||||
const enum TempVariableKind {
|
||||
auto = 0,
|
||||
_i = 1,
|
||||
_n = 2,
|
||||
// Flags enum to track count of temp variables and a few dedicated names
|
||||
const enum TempFlags {
|
||||
Auto = 0x00000000, // No preferred name
|
||||
CountMask = 0x0FFFFFFF, // Temp variable counter
|
||||
_i = 0x10000000, // Use/preference flag for '_i'
|
||||
_n = 0x20000000, // Use/preference flag for '_n'
|
||||
}
|
||||
|
||||
// @internal
|
||||
@@ -88,22 +88,20 @@ module ts {
|
||||
let writeLine = writer.writeLine;
|
||||
let increaseIndent = writer.increaseIndent;
|
||||
let decreaseIndent = writer.decreaseIndent;
|
||||
let preserveNewLines = compilerOptions.preserveNewLines || false;
|
||||
|
||||
let currentSourceFile: SourceFile;
|
||||
|
||||
let generatedNameSet: Map<string>;
|
||||
let nodeToGeneratedName: string[];
|
||||
let generatedNameSet: Map<string> = {};
|
||||
let nodeToGeneratedName: string[] = [];
|
||||
let blockScopedVariableToGeneratedName: string[];
|
||||
let computedPropertyNamesToGeneratedNames: string[];
|
||||
|
||||
let extendsEmitted = false;
|
||||
let decorateEmitted = false;
|
||||
let tempCount = 0;
|
||||
let tempFlags = 0;
|
||||
let tempVariables: Identifier[];
|
||||
let tempParameters: Identifier[];
|
||||
let externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[];
|
||||
let predefinedTempsInUse = TempVariableKind.auto;
|
||||
let exportSpecifiers: Map<ExportSpecifier[]>;
|
||||
let exportEquals: ExportAssignment;
|
||||
let hasExportStars: boolean;
|
||||
@@ -168,6 +166,98 @@ module ts {
|
||||
emit(sourceFile);
|
||||
}
|
||||
|
||||
function isUniqueName(name: string): boolean {
|
||||
return !resolver.hasGlobalName(name) &&
|
||||
!hasProperty(currentSourceFile.identifiers, name) &&
|
||||
!hasProperty(generatedNameSet, name);
|
||||
}
|
||||
|
||||
// Return the next available name in the pattern _a ... _z, _0, _1, ...
|
||||
// TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name.
|
||||
// Note that names generated by makeTempVariableName and makeUniqueName will never conflict.
|
||||
function makeTempVariableName(flags: TempFlags): string {
|
||||
if (flags && !(tempFlags & flags)) {
|
||||
var name = flags === TempFlags._i ? "_i" : "_n"
|
||||
if (isUniqueName(name)) {
|
||||
tempFlags |= flags;
|
||||
return name;
|
||||
}
|
||||
}
|
||||
while (true) {
|
||||
let count = tempFlags & TempFlags.CountMask;
|
||||
tempFlags++;
|
||||
// Skip over 'i' and 'n'
|
||||
if (count !== 8 && count !== 13) {
|
||||
let name = count < 26 ? "_" + String.fromCharCode(CharacterCodes.a + count) : "_" + (count - 26);
|
||||
if (isUniqueName(name)) {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Generate a name that is unique within the current file and doesn't conflict with any names
|
||||
// in global scope. The name is formed by adding an '_n' suffix to the specified base name,
|
||||
// where n is a positive integer. Note that names generated by makeTempVariableName and
|
||||
// makeUniqueName are guaranteed to never conflict.
|
||||
function makeUniqueName(baseName: string): string {
|
||||
// Find the first unique 'name_n', where n is a positive number
|
||||
if (baseName.charCodeAt(baseName.length - 1) !== CharacterCodes._) {
|
||||
baseName += "_";
|
||||
}
|
||||
let i = 1;
|
||||
while (true) {
|
||||
let generatedName = baseName + i;
|
||||
if (isUniqueName(generatedName)) {
|
||||
return generatedNameSet[generatedName] = generatedName;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
function assignGeneratedName(node: Node, name: string) {
|
||||
nodeToGeneratedName[getNodeId(node)] = unescapeIdentifier(name);
|
||||
}
|
||||
|
||||
function generateNameForFunctionOrClassDeclaration(node: Declaration) {
|
||||
if (!node.name) {
|
||||
assignGeneratedName(node, makeUniqueName("default"));
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForModuleOrEnum(node: ModuleDeclaration | EnumDeclaration) {
|
||||
if (node.name.kind === SyntaxKind.Identifier) {
|
||||
let name = node.name.text;
|
||||
// Use module/enum name itself if it is unique, otherwise make a unique variation
|
||||
assignGeneratedName(node, isUniqueLocalName(name, node) ? name : makeUniqueName(name));
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForImportOrExportDeclaration(node: ImportDeclaration | ExportDeclaration) {
|
||||
let expr = getExternalModuleName(node);
|
||||
let baseName = expr.kind === SyntaxKind.StringLiteral ?
|
||||
escapeIdentifier(makeIdentifierFromModuleName((<LiteralExpression>expr).text)) : "module";
|
||||
assignGeneratedName(node, makeUniqueName(baseName));
|
||||
}
|
||||
|
||||
function generateNameForImportDeclaration(node: ImportDeclaration) {
|
||||
if (node.importClause) {
|
||||
generateNameForImportOrExportDeclaration(node);
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForExportDeclaration(node: ExportDeclaration) {
|
||||
if (node.moduleSpecifier) {
|
||||
generateNameForImportOrExportDeclaration(node);
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForExportAssignment(node: ExportAssignment) {
|
||||
if (node.expression && node.expression.kind !== SyntaxKind.Identifier) {
|
||||
assignGeneratedName(node, makeUniqueName("default"));
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForNode(node: Node) {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
@@ -190,175 +280,15 @@ module ts {
|
||||
case SyntaxKind.ExportAssignment:
|
||||
generateNameForExportAssignment(<ExportAssignment>node);
|
||||
break;
|
||||
case SyntaxKind.SourceFile:
|
||||
case SyntaxKind.ModuleBlock:
|
||||
forEach((<SourceFile | ModuleBlock>node).statements, generateNameForNode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function isUniqueName(name: string): boolean {
|
||||
return !resolver.hasGlobalName(name) &&
|
||||
!hasProperty(currentSourceFile.identifiers, name) &&
|
||||
(!generatedNameSet || !hasProperty(generatedNameSet, name))
|
||||
}
|
||||
|
||||
// in cases like
|
||||
// for (var x of []) {
|
||||
// _i;
|
||||
// }
|
||||
// we should be able to detect if let _i was shadowed by some temp variable that was allocated in scope
|
||||
function nameConflictsWithSomeTempVariable(name: string): boolean {
|
||||
// temp variable names always start with '_'
|
||||
if (name.length < 2 || name.charCodeAt(0) !== CharacterCodes._) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (name === "_i") {
|
||||
return !!(predefinedTempsInUse & TempVariableKind._i);
|
||||
}
|
||||
|
||||
if (name === "_n") {
|
||||
return !!(predefinedTempsInUse & TempVariableKind._n);
|
||||
}
|
||||
|
||||
if (name.length === 2 && name.charCodeAt(1) >= CharacterCodes.a && name.charCodeAt(1) <= CharacterCodes.z) {
|
||||
// handles _a .. _z
|
||||
let n = name.charCodeAt(1) - CharacterCodes.a;
|
||||
return n < tempCount;
|
||||
}
|
||||
else {
|
||||
// handles _1, _2...
|
||||
let n = +name.substring(1);
|
||||
return !isNaN(n) && n >= 0 && n < (tempCount - 26);
|
||||
}
|
||||
}
|
||||
|
||||
// This function generates a name using the following pattern:
|
||||
// _a .. _h, _j ... _z, _0, _1, ...
|
||||
// It is guaranteed that generated name will not shadow any existing user-defined names,
|
||||
// however it can hide another name generated by this function higher in the scope.
|
||||
// NOTE: names generated by 'makeTempVariableName' and 'makeUniqueName' will never conflict.
|
||||
// see comment for 'makeTempVariableName' for more information.
|
||||
function makeTempVariableName(location: Node, tempVariableKind: TempVariableKind): string {
|
||||
let tempName: string;
|
||||
if (tempVariableKind !== TempVariableKind.auto && !(predefinedTempsInUse & tempVariableKind)) {
|
||||
tempName = tempVariableKind === TempVariableKind._i ? "_i" : "_n";
|
||||
if (!resolver.resolvesToSomeValue(location, tempName)) {
|
||||
predefinedTempsInUse |= tempVariableKind;
|
||||
return tempName;
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
// Note: we avoid generating _i and _n as those are common names we want in other places.
|
||||
var char = CharacterCodes.a + tempCount;
|
||||
if (char !== CharacterCodes.i && char !== CharacterCodes.n) {
|
||||
if (tempCount < 26) {
|
||||
tempName = "_" + String.fromCharCode(char);
|
||||
}
|
||||
else {
|
||||
tempName = "_" + (tempCount - 26);
|
||||
}
|
||||
}
|
||||
|
||||
tempCount++;
|
||||
}
|
||||
while (resolver.resolvesToSomeValue(location, tempName));
|
||||
|
||||
return tempName;
|
||||
}
|
||||
|
||||
// Generates a name that is unique within current file and does not collide with
|
||||
// any names in global scope.
|
||||
// NOTE: names generated by 'makeTempVariableName' and 'makeUniqueName' will never conflict
|
||||
// because of the way how these names are generated
|
||||
// - makeUniqueName builds a name by picking a base name (which should not be empty string)
|
||||
// and appending suffix '_<number>'
|
||||
// - makeTempVariableName creates a name using the following pattern:
|
||||
// _a .. _h, _j ... _z, _0, _1, ...
|
||||
// This means that names from 'makeTempVariableName' will have only one underscore at the beginning
|
||||
// and names from 'makeUniqieName' will have at least one underscore in the middle
|
||||
// so they will never collide.
|
||||
function makeUniqueName(baseName: string): string {
|
||||
Debug.assert(!!baseName);
|
||||
|
||||
// Find the first unique 'name_n', where n is a positive number
|
||||
if (baseName.charCodeAt(baseName.length - 1) !== CharacterCodes._) {
|
||||
baseName += "_";
|
||||
}
|
||||
|
||||
let i = 1;
|
||||
let generatedName: string;
|
||||
while (true) {
|
||||
generatedName = baseName + i;
|
||||
if (isUniqueName(generatedName)) {
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
if (!generatedNameSet) {
|
||||
generatedNameSet = {};
|
||||
}
|
||||
return generatedNameSet[generatedName] = generatedName;
|
||||
}
|
||||
|
||||
function renameNode(node: Node, name: string): string {
|
||||
var nodeId = getNodeId(node);
|
||||
|
||||
if (!nodeToGeneratedName) {
|
||||
nodeToGeneratedName = [];
|
||||
}
|
||||
|
||||
return nodeToGeneratedName[nodeId] = unescapeIdentifier(name);
|
||||
}
|
||||
|
||||
function generateNameForFunctionOrClassDeclaration(node: Declaration) {
|
||||
if (!node.name) {
|
||||
renameNode(node, makeUniqueName("default"));
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForModuleOrEnum(node: ModuleDeclaration | EnumDeclaration) {
|
||||
if (node.name.kind === SyntaxKind.Identifier) {
|
||||
let name = node.name.text;
|
||||
// Use module/enum name itself if it is unique, otherwise make a unique variation
|
||||
renameNode(node, isUniqueLocalName(name, node) ? name : makeUniqueName(name));
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForImportOrExportDeclaration(node: ImportDeclaration | ExportDeclaration) {
|
||||
let expr = getExternalModuleName(node);
|
||||
let baseName = expr.kind === SyntaxKind.StringLiteral ?
|
||||
escapeIdentifier(makeIdentifierFromModuleName((<LiteralExpression>expr).text)) : "module";
|
||||
renameNode(node, makeUniqueName(baseName));
|
||||
}
|
||||
|
||||
function generateNameForImportDeclaration(node: ImportDeclaration) {
|
||||
if (node.importClause) {
|
||||
generateNameForImportOrExportDeclaration(node);
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForExportDeclaration(node: ExportDeclaration) {
|
||||
if (node.moduleSpecifier) {
|
||||
generateNameForImportOrExportDeclaration(node);
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForExportAssignment(node: ExportAssignment) {
|
||||
if (node.expression && node.expression.kind !== SyntaxKind.Identifier) {
|
||||
renameNode(node, makeUniqueName("default"));
|
||||
}
|
||||
}
|
||||
|
||||
function getGeneratedNameForNode(node: Node) {
|
||||
let nodeId = getNodeId(node);
|
||||
if (!nodeToGeneratedName || !nodeToGeneratedName[nodeId]) {
|
||||
if (!nodeToGeneratedName[nodeId]) {
|
||||
generateNameForNode(node);
|
||||
}
|
||||
return nodeToGeneratedName ? nodeToGeneratedName[nodeId] : undefined;
|
||||
return nodeToGeneratedName[nodeId];
|
||||
}
|
||||
|
||||
function initializeEmitterWithSourceMaps() {
|
||||
@@ -726,9 +656,9 @@ module ts {
|
||||
}
|
||||
|
||||
// Create a temporary variable with a unique unused name.
|
||||
function createTempVariable(location: Node, tempVariableKind = TempVariableKind.auto): Identifier {
|
||||
function createTempVariable(flags: TempFlags): Identifier {
|
||||
let result = <Identifier>createSynthesizedNode(SyntaxKind.Identifier);
|
||||
result.text = makeTempVariableName(location, tempVariableKind);
|
||||
result.text = makeTempVariableName(flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -739,8 +669,8 @@ module ts {
|
||||
tempVariables.push(name);
|
||||
}
|
||||
|
||||
function createAndRecordTempVariable(location: Node, tempVariableKind?: TempVariableKind): Identifier {
|
||||
let temp = createTempVariable(location, tempVariableKind);
|
||||
function createAndRecordTempVariable(flags: TempFlags): Identifier {
|
||||
let temp = createTempVariable(flags);
|
||||
recordTempDeclaration(temp);
|
||||
|
||||
return temp;
|
||||
@@ -799,7 +729,7 @@ module ts {
|
||||
|
||||
increaseIndent();
|
||||
|
||||
if (preserveNewLines && nodeStartPositionsAreOnSameLine(parent, nodes[0])) {
|
||||
if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) {
|
||||
if (spacesBetweenBraces) {
|
||||
write(" ");
|
||||
}
|
||||
@@ -810,7 +740,7 @@ module ts {
|
||||
|
||||
for (let i = 0, n = nodes.length; i < n; i++) {
|
||||
if (i) {
|
||||
if (preserveNewLines && nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) {
|
||||
if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) {
|
||||
write(", ");
|
||||
}
|
||||
else {
|
||||
@@ -828,7 +758,7 @@ module ts {
|
||||
|
||||
decreaseIndent();
|
||||
|
||||
if (preserveNewLines && nodeEndPositionsAreOnSameLine(parent, lastOrUndefined(nodes))) {
|
||||
if (nodeEndPositionsAreOnSameLine(parent, lastOrUndefined(nodes))) {
|
||||
if (spacesBetweenBraces) {
|
||||
write(" ");
|
||||
}
|
||||
@@ -982,7 +912,7 @@ module ts {
|
||||
}
|
||||
|
||||
function emitDownlevelTaggedTemplate(node: TaggedTemplateExpression) {
|
||||
let tempVariable = createAndRecordTempVariable(node);
|
||||
let tempVariable = createAndRecordTempVariable(TempFlags.Auto);
|
||||
write("(");
|
||||
emit(tempVariable);
|
||||
write(" = ");
|
||||
@@ -1178,7 +1108,7 @@ module ts {
|
||||
return;
|
||||
}
|
||||
|
||||
let generatedVariable = createTempVariable(node);
|
||||
let generatedVariable = createTempVariable(TempFlags.Auto);
|
||||
generatedName = generatedVariable.text;
|
||||
recordTempDeclaration(generatedVariable);
|
||||
computedPropertyNamesToGeneratedNames[node.id] = generatedName;
|
||||
@@ -1425,7 +1355,7 @@ module ts {
|
||||
function createDownlevelObjectLiteralWithComputedProperties(originalObjectLiteral: ObjectLiteralExpression, firstComputedPropertyIndex: number): ParenthesizedExpression {
|
||||
// For computed properties, we need to create a unique handle to the object
|
||||
// literal so we can modify it without risking internal assignments tainting the object.
|
||||
let tempVar = createAndRecordTempVariable(originalObjectLiteral);
|
||||
let tempVar = createAndRecordTempVariable(TempFlags.Auto);
|
||||
|
||||
// Hold onto the initial non-computed properties in a new object literal,
|
||||
// then create the rest through property accesses on the temp variable.
|
||||
@@ -1727,7 +1657,7 @@ module ts {
|
||||
// If the code is not indented, an optional valueToWriteWhenNotIndenting will be
|
||||
// emitted instead.
|
||||
function indentIfOnDifferentLines(parent: Node, node1: Node, node2: Node, valueToWriteWhenNotIndenting?: string): boolean {
|
||||
let realNodesAreOnDifferentLines = preserveNewLines && !nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2);
|
||||
let realNodesAreOnDifferentLines = !nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2);
|
||||
|
||||
// Always use a newline for synthesized code if the synthesizer desires it.
|
||||
let synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2);
|
||||
@@ -1790,7 +1720,7 @@ module ts {
|
||||
emit(node);
|
||||
return node;
|
||||
}
|
||||
let temp = createAndRecordTempVariable(node);
|
||||
let temp = createAndRecordTempVariable(TempFlags.Auto);
|
||||
|
||||
write("(");
|
||||
emit(temp);
|
||||
@@ -2035,7 +1965,7 @@ module ts {
|
||||
}
|
||||
|
||||
function emitBlock(node: Block) {
|
||||
if (preserveNewLines && isSingleLineEmptyBlock(node)) {
|
||||
if (isSingleLineEmptyBlock(node)) {
|
||||
emitToken(SyntaxKind.OpenBraceToken, node.pos);
|
||||
write(" ");
|
||||
emitToken(SyntaxKind.CloseBraceToken, node.statements.end);
|
||||
@@ -2234,10 +2164,8 @@ module ts {
|
||||
//
|
||||
// we don't want to emit a temporary variable for the RHS, just use it directly.
|
||||
let rhsIsIdentifier = node.expression.kind === SyntaxKind.Identifier;
|
||||
let counter = createTempVariable(node, TempVariableKind._i);
|
||||
let rhsReference = rhsIsIdentifier ? <Identifier>node.expression : createTempVariable(node);
|
||||
|
||||
var cachedLength = compilerOptions.cacheDownlevelForOfLength ? createTempVariable(node, TempVariableKind._n) : undefined;
|
||||
let counter = createTempVariable(TempFlags._i);
|
||||
let rhsReference = rhsIsIdentifier ? <Identifier>node.expression : createTempVariable(TempFlags.Auto);
|
||||
|
||||
// This is the let keyword for the counter and rhsReference. The let keyword for
|
||||
// the LHS will be emitted inside the body.
|
||||
@@ -2259,14 +2187,6 @@ module ts {
|
||||
emitEnd(node.expression);
|
||||
}
|
||||
|
||||
if (cachedLength) {
|
||||
write(", ");
|
||||
emitNodeWithoutSourceMap(cachedLength);
|
||||
write(" = ");
|
||||
emitNodeWithoutSourceMap(rhsReference);
|
||||
write(".length");
|
||||
}
|
||||
|
||||
write("; ");
|
||||
|
||||
// _i < _a.length;
|
||||
@@ -2274,13 +2194,8 @@ module ts {
|
||||
emitNodeWithoutSourceMap(counter);
|
||||
write(" < ");
|
||||
|
||||
if (cachedLength) {
|
||||
emitNodeWithoutSourceMap(cachedLength);
|
||||
}
|
||||
else {
|
||||
emitNodeWithoutSourceMap(rhsReference);
|
||||
write(".length");
|
||||
}
|
||||
emitNodeWithoutSourceMap(rhsReference);
|
||||
write(".length");
|
||||
|
||||
emitEnd(node.initializer);
|
||||
write("; ");
|
||||
@@ -2322,7 +2237,7 @@ module ts {
|
||||
else {
|
||||
// It's an empty declaration list. This can only happen in an error case, if the user wrote
|
||||
// for (let of []) {}
|
||||
emitNodeWithoutSourceMap(createTempVariable(node));
|
||||
emitNodeWithoutSourceMap(createTempVariable(TempFlags.Auto));
|
||||
write(" = ");
|
||||
emitNodeWithoutSourceMap(rhsIterationValue);
|
||||
}
|
||||
@@ -2419,7 +2334,7 @@ module ts {
|
||||
write("default:");
|
||||
}
|
||||
|
||||
if (preserveNewLines && node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) {
|
||||
if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) {
|
||||
write(" ");
|
||||
emit(node.statements[0]);
|
||||
}
|
||||
@@ -2581,7 +2496,7 @@ module ts {
|
||||
// In case the root is a synthesized node, we need to pass lowestNonSynthesizedAncestor
|
||||
// as the location for determining uniqueness of the variable we are about to
|
||||
// generate.
|
||||
let identifier = createTempVariable(lowestNonSynthesizedAncestor || root);
|
||||
let identifier = createTempVariable(TempFlags.Auto);
|
||||
if (!isDeclaration) {
|
||||
recordTempDeclaration(identifier);
|
||||
}
|
||||
@@ -2860,11 +2775,7 @@ module ts {
|
||||
? blockScopeContainer
|
||||
: blockScopeContainer.parent;
|
||||
|
||||
var hasConflictsInEnclosingScope =
|
||||
resolver.resolvesToSomeValue(parent, (<Identifier>node).text) ||
|
||||
nameConflictsWithSomeTempVariable((<Identifier>node).text);
|
||||
|
||||
if (hasConflictsInEnclosingScope) {
|
||||
if (resolver.resolvesToSomeValue(parent, (<Identifier>node).text)) {
|
||||
let variableId = resolver.getBlockScopedVariableId(<Identifier>node);
|
||||
if (!blockScopedVariableToGeneratedName) {
|
||||
blockScopedVariableToGeneratedName = [];
|
||||
@@ -2900,7 +2811,7 @@ module ts {
|
||||
function emitParameter(node: ParameterDeclaration) {
|
||||
if (languageVersion < ScriptTarget.ES6) {
|
||||
if (isBindingPattern(node.name)) {
|
||||
let name = createTempVariable(node);
|
||||
let name = createTempVariable(TempFlags.Auto);
|
||||
if (!tempParameters) {
|
||||
tempParameters = [];
|
||||
}
|
||||
@@ -2954,7 +2865,7 @@ module ts {
|
||||
if (languageVersion < ScriptTarget.ES6 && hasRestParameters(node)) {
|
||||
let restIndex = node.parameters.length - 1;
|
||||
let restParam = node.parameters[restIndex];
|
||||
let tempName = createTempVariable(node, TempVariableKind._i).text;
|
||||
let tempName = createTempVariable(TempFlags._i).text;
|
||||
writeLine();
|
||||
emitLeadingComments(restParam);
|
||||
emitStart(restParam);
|
||||
@@ -3087,15 +2998,12 @@ module ts {
|
||||
}
|
||||
|
||||
function emitSignatureAndBody(node: FunctionLikeDeclaration) {
|
||||
let saveTempCount = tempCount;
|
||||
let saveTempFlags = tempFlags;
|
||||
let saveTempVariables = tempVariables;
|
||||
let saveTempParameters = tempParameters;
|
||||
let savePredefinedTempsInUse = predefinedTempsInUse;
|
||||
|
||||
tempCount = 0;
|
||||
tempFlags = 0;
|
||||
tempVariables = undefined;
|
||||
tempParameters = undefined;
|
||||
predefinedTempsInUse = TempVariableKind.auto;
|
||||
|
||||
// When targeting ES6, emit arrow function natively in ES6
|
||||
if (shouldEmitAsArrowFunction(node)) {
|
||||
@@ -3122,8 +3030,7 @@ module ts {
|
||||
emitExportMemberAssignment(node);
|
||||
}
|
||||
|
||||
predefinedTempsInUse = savePredefinedTempsInUse;
|
||||
tempCount = saveTempCount;
|
||||
tempFlags = saveTempFlags;
|
||||
tempVariables = saveTempVariables;
|
||||
tempParameters = saveTempParameters;
|
||||
}
|
||||
@@ -3169,7 +3076,7 @@ module ts {
|
||||
|
||||
// If we didn't have to emit any preamble code, then attempt to keep the arrow
|
||||
// function on one line.
|
||||
if (preserveNewLines && !preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) {
|
||||
if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) {
|
||||
write(" ");
|
||||
emitStart(body);
|
||||
write("return ");
|
||||
@@ -3217,7 +3124,7 @@ module ts {
|
||||
|
||||
let preambleEmitted = writer.getTextPos() !== initialTextPos;
|
||||
|
||||
if (preserveNewLines && !preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) {
|
||||
if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) {
|
||||
for (let statement of body.statements) {
|
||||
write(" ");
|
||||
emit(statement);
|
||||
@@ -3410,14 +3317,12 @@ module ts {
|
||||
}
|
||||
|
||||
function emitConstructor(node: ClassDeclaration, baseTypeNode: TypeReferenceNode) {
|
||||
let saveTempCount = tempCount;
|
||||
let saveTempFlags = tempFlags;
|
||||
let saveTempVariables = tempVariables;
|
||||
let saveTempParameters = tempParameters;
|
||||
let savePredefinedTempsInUse = predefinedTempsInUse;
|
||||
tempCount = 0;
|
||||
tempFlags = 0;
|
||||
tempVariables = undefined;
|
||||
tempParameters = undefined;
|
||||
predefinedTempsInUse = TempVariableKind.auto;
|
||||
|
||||
// Check if we have property assignment inside class declaration.
|
||||
// If there is property assignment, we need to emit constructor whether users define it or not
|
||||
@@ -3527,8 +3432,7 @@ module ts {
|
||||
emitTrailingComments(ctor);
|
||||
}
|
||||
|
||||
predefinedTempsInUse = savePredefinedTempsInUse;
|
||||
tempCount = saveTempCount;
|
||||
tempFlags = saveTempFlags;
|
||||
tempVariables = saveTempVariables;
|
||||
tempParameters = saveTempParameters;
|
||||
}
|
||||
@@ -3695,11 +3599,11 @@ module ts {
|
||||
write("_super");
|
||||
}
|
||||
write(") {");
|
||||
let saveTempCount = tempCount;
|
||||
let saveTempFlags = tempFlags;
|
||||
let saveTempVariables = tempVariables;
|
||||
let saveTempParameters = tempParameters;
|
||||
let saveComputedPropertyNamesToGeneratedNames = computedPropertyNamesToGeneratedNames;
|
||||
tempCount = 0;
|
||||
tempFlags = 0;
|
||||
tempVariables = undefined;
|
||||
tempParameters = undefined;
|
||||
computedPropertyNamesToGeneratedNames = undefined;
|
||||
@@ -3726,7 +3630,7 @@ module ts {
|
||||
});
|
||||
write(";");
|
||||
emitTempDeclarations(/*newLine*/ true);
|
||||
tempCount = saveTempCount;
|
||||
tempFlags = saveTempFlags;
|
||||
tempVariables = saveTempVariables;
|
||||
tempParameters = saveTempParameters;
|
||||
computedPropertyNamesToGeneratedNames = saveComputedPropertyNamesToGeneratedNames;
|
||||
@@ -4089,17 +3993,14 @@ module ts {
|
||||
emitEnd(node.name);
|
||||
write(") ");
|
||||
if (node.body.kind === SyntaxKind.ModuleBlock) {
|
||||
let saveTempCount = tempCount;
|
||||
let saveTempFlags = tempFlags;
|
||||
let saveTempVariables = tempVariables;
|
||||
let savePredefinedTempsInUse = predefinedTempsInUse;
|
||||
tempCount = 0;
|
||||
tempFlags = 0;
|
||||
tempVariables = undefined;
|
||||
predefinedTempsInUse = TempVariableKind.auto;
|
||||
|
||||
emit(node.body);
|
||||
|
||||
predefinedTempsInUse = savePredefinedTempsInUse;
|
||||
tempCount = saveTempCount;
|
||||
tempFlags = saveTempFlags;
|
||||
tempVariables = saveTempVariables;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -276,6 +276,7 @@ module ts {
|
||||
|
||||
// If a source file changes, mark it as unwatched and start the recompilation timer
|
||||
function sourceFileChanged(sourceFile: SourceFile) {
|
||||
sourceFile.fileWatcher.close();
|
||||
sourceFile.fileWatcher = undefined;
|
||||
startTimer();
|
||||
}
|
||||
|
||||
@@ -1589,8 +1589,6 @@ module ts {
|
||||
watch?: boolean;
|
||||
separateCompilation?: boolean;
|
||||
/* @internal */ stripInternal?: boolean;
|
||||
/* @internal */ preserveNewLines?: boolean;
|
||||
/* @internal */ cacheDownlevelForOfLength?: boolean;
|
||||
[option: string]: string | number | boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -1008,10 +1008,6 @@ module Harness {
|
||||
options.outDir = setting.value;
|
||||
break;
|
||||
|
||||
case 'preservenewlines':
|
||||
options.preserveNewLines = !!setting.value;
|
||||
break;
|
||||
|
||||
case 'sourceroot':
|
||||
options.sourceRoot = setting.value;
|
||||
break;
|
||||
@@ -1465,7 +1461,7 @@ module Harness {
|
||||
var optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*(\S*)/gm; // multiple matches on multiple lines
|
||||
|
||||
// List of allowed metadata names
|
||||
var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums", "preservenewlines", "includebuiltfile", "suppressimplicitanyindexerrors", "stripinternal"];
|
||||
var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums", "includebuiltfile", "suppressimplicitanyindexerrors", "stripinternal"];
|
||||
|
||||
function extractCompilerSettings(content: string): CompilerSetting[] {
|
||||
|
||||
@@ -1703,6 +1699,14 @@ module Harness {
|
||||
return (Path.getFileName(filePath) === 'lib.d.ts') || (Path.getFileName(filePath) === 'lib.core.d.ts');
|
||||
}
|
||||
|
||||
export function getDefaultLibraryFile(): { unitName: string, content: string } {
|
||||
var libFile = Harness.userSpecifiedroot + Harness.libFolder + "/" + "lib.d.ts";
|
||||
return {
|
||||
unitName: libFile,
|
||||
content: IO.readFile(libFile)
|
||||
}
|
||||
}
|
||||
|
||||
if (Error) (<any>Error).stackTraceLimit = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ interface IOLog {
|
||||
arguments: string[];
|
||||
executingPath: string;
|
||||
currentDirectory: string;
|
||||
useCustomLibraryFile?: boolean;
|
||||
filesRead: {
|
||||
path: string;
|
||||
codepage: number;
|
||||
|
||||
+38
-14
@@ -32,6 +32,7 @@ module RWC {
|
||||
};
|
||||
var baseName = /(.*)\/(.*).json/.exec(ts.normalizeSlashes(jsonPath))[2];
|
||||
var currentDirectory: string;
|
||||
var useCustomLibraryFile: boolean;
|
||||
|
||||
after(() => {
|
||||
// Mocha holds onto the closure environment of the describe callback even after the test is done.
|
||||
@@ -43,6 +44,10 @@ module RWC {
|
||||
baselineOpts = undefined;
|
||||
baseName = undefined;
|
||||
currentDirectory = undefined;
|
||||
// useCustomLibraryFile is a flag specified in the json object to indicate whether to use built/local/lib.d.ts
|
||||
// or to use lib.d.ts inside the json object. If the flag is true, use the lib.d.ts inside json file
|
||||
// otherwise use the lib.d.ts from built/local
|
||||
useCustomLibraryFile = undefined;
|
||||
});
|
||||
|
||||
it('can compile', () => {
|
||||
@@ -51,34 +56,52 @@ module RWC {
|
||||
|
||||
var ioLog: IOLog = JSON.parse(Harness.IO.readFile(jsonPath));
|
||||
currentDirectory = ioLog.currentDirectory;
|
||||
useCustomLibraryFile = ioLog.useCustomLibraryFile;
|
||||
runWithIOLog(ioLog, () => {
|
||||
opts = ts.parseCommandLine(ioLog.arguments);
|
||||
assert.equal(opts.errors.length, 0);
|
||||
|
||||
// To provide test coverage of output javascript file,
|
||||
// we will set noEmitOnError flag to be false.
|
||||
opts.options.noEmitOnError = false;
|
||||
});
|
||||
|
||||
runWithIOLog(ioLog, () => {
|
||||
harnessCompiler.reset();
|
||||
|
||||
// Load the files
|
||||
ts.forEach(opts.fileNames, fileName => {
|
||||
inputFiles.push(getHarnessCompilerInputUnit(fileName));
|
||||
});
|
||||
|
||||
if (!opts.options.noLib) {
|
||||
// Find the lib.d.ts file in the input file and add it to the input files list
|
||||
var libFile = ts.forEach(ioLog.filesRead, fileRead=> Harness.isLibraryFile(fileRead.path) ? fileRead.path : undefined);
|
||||
if (libFile) {
|
||||
inputFiles.push(getHarnessCompilerInputUnit(libFile));
|
||||
}
|
||||
}
|
||||
|
||||
ts.forEach(ioLog.filesRead, fileRead => {
|
||||
// Add files to compilation
|
||||
for(let fileRead of ioLog.filesRead) {
|
||||
// Check if the file is already added into the set of input files.
|
||||
var resolvedPath = ts.normalizeSlashes(ts.sys.resolvePath(fileRead.path));
|
||||
var inInputList = ts.forEach(inputFiles, inputFile=> inputFile.unitName === resolvedPath);
|
||||
if (!inInputList) {
|
||||
// Add the file to other files
|
||||
var inInputList = ts.forEach(inputFiles, inputFile => inputFile.unitName === resolvedPath);
|
||||
|
||||
if (!Harness.isLibraryFile(fileRead.path)) {
|
||||
if (inInputList) {
|
||||
continue;
|
||||
}
|
||||
otherFiles.push(getHarnessCompilerInputUnit(fileRead.path));
|
||||
}
|
||||
});
|
||||
else if (!opts.options.noLib && Harness.isLibraryFile(fileRead.path)){
|
||||
if (!inInputList) {
|
||||
// If useCustomLibraryFile is true, we will use lib.d.ts from json object
|
||||
// otherwise use the lib.d.ts from built/local
|
||||
// Majority of RWC code will be using built/local/lib.d.ts instead of
|
||||
// lib.d.ts inside json file. However, some RWC cases will still use
|
||||
// their own version of lib.d.ts because they have customized lib.d.ts
|
||||
if (useCustomLibraryFile) {
|
||||
inputFiles.push(getHarnessCompilerInputUnit(fileRead.path));
|
||||
}
|
||||
else {
|
||||
inputFiles.push(Harness.getDefaultLibraryFile());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// do not use lib since we already read it in above
|
||||
opts.options.noLib = true;
|
||||
@@ -115,9 +138,10 @@ module RWC {
|
||||
|
||||
it('has the expected declaration file content', () => {
|
||||
Harness.Baseline.runBaseline('has the expected declaration file content', baseName + '.d.ts', () => {
|
||||
if (compilerResult.errors.length || !compilerResult.declFilesCode.length) {
|
||||
if (!compilerResult.declFilesCode.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Harness.Compiler.collateOutputs(compilerResult.declFilesCode);
|
||||
}, false, baselineOpts);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/// <reference path="..\compiler\commandLineParser.ts" />
|
||||
/// <reference path="..\services\services.ts" />
|
||||
/// <reference path="protocol.d.ts" />
|
||||
/// <reference path="session.ts" />
|
||||
/// <reference path="node.d.ts" />
|
||||
|
||||
module ts.server {
|
||||
@@ -16,6 +18,16 @@ module ts.server {
|
||||
|
||||
var lineCollectionCapacity = 4;
|
||||
|
||||
function mergeFormatOptions(formatCodeOptions: FormatCodeOptions, formatOptions: protocol.FormatOptions): void {
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
Object.keys(formatOptions).forEach((key) => {
|
||||
var codeKey = key.charAt(0).toUpperCase() + key.substring(1);
|
||||
if (hasOwnProperty.call(formatCodeOptions, codeKey)) {
|
||||
formatCodeOptions[codeKey] = formatOptions[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
class ScriptInfo {
|
||||
svc: ScriptVersionCache;
|
||||
children: ScriptInfo[] = []; // files referenced by this file
|
||||
@@ -27,12 +39,9 @@ module ts.server {
|
||||
this.svc = ScriptVersionCache.fromString(content);
|
||||
}
|
||||
|
||||
setFormatOptions(tabSize?: number, indentSize?: number) {
|
||||
if (tabSize) {
|
||||
this.formatCodeOptions.TabSize = tabSize;
|
||||
}
|
||||
if (indentSize) {
|
||||
this.formatCodeOptions.IndentSize = indentSize;
|
||||
setFormatOptions(formatOptions: protocol.FormatOptions): void {
|
||||
if (formatOptions) {
|
||||
mergeFormatOptions(this.formatCodeOptions, formatOptions);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -448,15 +457,19 @@ module ts.server {
|
||||
if (args.file) {
|
||||
var info = this.filenameToScriptInfo[args.file];
|
||||
if (info) {
|
||||
info.setFormatOptions(args.tabSize, args.indentSize);
|
||||
this.log("Host configuration update for file " + args.file + " tab size " + args.tabSize);
|
||||
info.setFormatOptions(args.formatOptions);
|
||||
this.log("Host configuration update for file " + args.file);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.hostConfiguration.formatCodeOptions.TabSize = args.tabSize;
|
||||
this.hostConfiguration.formatCodeOptions.IndentSize = args.indentSize;
|
||||
this.hostConfiguration.hostInfo = args.hostInfo;
|
||||
this.log("Host information " + args.hostInfo, "Info");
|
||||
if (args.hostInfo !== undefined) {
|
||||
this.hostConfiguration.hostInfo = args.hostInfo;
|
||||
this.log("Host information " + args.hostInfo, "Info");
|
||||
}
|
||||
if (args.formatOptions) {
|
||||
mergeFormatOptions(this.hostConfiguration.formatCodeOptions, args.formatOptions);
|
||||
this.log("Format host information updated", "Info");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -751,6 +764,26 @@ module ts.server {
|
||||
return info;
|
||||
}
|
||||
|
||||
// This is different from the method the compiler uses because
|
||||
// the compiler can assume it will always start searching in the
|
||||
// current directory (the directory in which tsc was invoked).
|
||||
// The server must start searching from the directory containing
|
||||
// the newly opened file.
|
||||
findConfigFile(searchPath: string): string {
|
||||
while (true) {
|
||||
var fileName = ts.combinePaths(searchPath, "tsconfig.json");
|
||||
if (sys.fileExists(fileName)) {
|
||||
return fileName;
|
||||
}
|
||||
var parentPath = ts.getDirectoryPath(searchPath);
|
||||
if (parentPath === searchPath) {
|
||||
break;
|
||||
}
|
||||
searchPath = parentPath;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open file whose contents is managed by the client
|
||||
* @param filename is absolute pathname
|
||||
@@ -758,7 +791,13 @@ module ts.server {
|
||||
|
||||
openClientFile(fileName: string) {
|
||||
var searchPath = ts.normalizePath(getDirectoryPath(fileName));
|
||||
var configFileName = ts.findConfigFile(searchPath);
|
||||
this.log("Search path: " + searchPath,"Info");
|
||||
var configFileName = this.findConfigFile(searchPath);
|
||||
if (configFileName) {
|
||||
this.log("Config file name: " + configFileName, "Info");
|
||||
} else {
|
||||
this.log("no config file");
|
||||
}
|
||||
if (configFileName) {
|
||||
configFileName = getAbsolutePath(configFileName, searchPath);
|
||||
}
|
||||
|
||||
Vendored
+59
-9
@@ -299,23 +299,77 @@ declare module ts.server.protocol {
|
||||
body?: RenameResponseBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor options
|
||||
*/
|
||||
export interface EditorOptions {
|
||||
|
||||
/** Number of spaces for each tab. Default value is 4. */
|
||||
tabSize?: number;
|
||||
|
||||
/** Number of spaces to indent during formatting. Default value is 4. */
|
||||
indentSize?: number;
|
||||
|
||||
/** The new line character to be used. Default value is the OS line delimiter. */
|
||||
newLineCharacter?: string;
|
||||
|
||||
/** Whether tabs should be converted to spaces. Default value is true. */
|
||||
convertTabsToSpaces?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format options
|
||||
*/
|
||||
export interface FormatOptions extends EditorOptions {
|
||||
|
||||
/** Defines space handling after a comma delimiter. Default value is true. */
|
||||
insertSpaceAfterCommaDelimiter?: boolean;
|
||||
|
||||
/** Defines space handling after a semicolon in a for statemen. Default value is true */
|
||||
insertSpaceAfterSemicolonInForStatements?: boolean;
|
||||
|
||||
/** Defines space handling after a binary operator. Default value is true. */
|
||||
insertSpaceBeforeAndAfterBinaryOperators?: boolean;
|
||||
|
||||
/** Defines space handling after keywords in control flow statement. Default value is true. */
|
||||
insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
|
||||
|
||||
/** Defines space handling after function keyword for anonymous functions. Default value is false. */
|
||||
insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
|
||||
|
||||
/** Defines space handling after opening and before closing non empty parenthesis. Default value is false. */
|
||||
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
|
||||
|
||||
/** Defines whether an open brace is put onto a new line for functions or not. Default value is false. */
|
||||
placeOpenBraceOnNewLineForFunctions?: boolean;
|
||||
|
||||
/** Defines whether an open brace is put onto a new line for control blocks or not. Default value is false. */
|
||||
placeOpenBraceOnNewLineForControlBlocks?: boolean;
|
||||
|
||||
/** Index operator */
|
||||
[key:string] : string | number | boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information found in a configure request.
|
||||
*/
|
||||
export interface ConfigureRequestArguments {
|
||||
/** Number of spaces for each tab */
|
||||
tabSize: number;
|
||||
/** Number of spaces to indent during formatting */
|
||||
indentSize: number;
|
||||
|
||||
/**
|
||||
* Information about the host, for example 'Emacs 24.4' or
|
||||
* 'Sublime Text version 3075'
|
||||
*/
|
||||
hostInfo: string;
|
||||
hostInfo?: string;
|
||||
|
||||
/**
|
||||
* If present, tab settings apply only to this file.
|
||||
*/
|
||||
file?: string;
|
||||
|
||||
/**
|
||||
* The format options to use during formatting and other code editing features.
|
||||
*/
|
||||
formatOptions?: FormatOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -337,10 +391,6 @@ declare module ts.server.protocol {
|
||||
* Information found in an "open" request.
|
||||
*/
|
||||
export interface OpenRequestArgs extends FileRequestArgs {
|
||||
/** Initial tab size of file. */
|
||||
tabSize?: number;
|
||||
/** Number of spaces to indent during formatting */
|
||||
indentSize?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -398,12 +398,9 @@ module ts.server {
|
||||
};
|
||||
}
|
||||
|
||||
openClientFile(fileName: string, tabSize?: number, indentSize?: number) {
|
||||
openClientFile(fileName: string) {
|
||||
var file = ts.normalizePath(fileName);
|
||||
var info = this.projectService.openClientFile(file);
|
||||
if (info) {
|
||||
info.setFormatOptions(tabSize, indentSize);
|
||||
}
|
||||
this.projectService.openClientFile(file);
|
||||
}
|
||||
|
||||
getQuickInfo(line: number, offset: number, fileName: string): protocol.QuickInfoResponseBody {
|
||||
@@ -789,7 +786,7 @@ module ts.server {
|
||||
}
|
||||
case CommandNames.Open: {
|
||||
var openArgs = <protocol.OpenRequestArgs>request.arguments;
|
||||
this.openClientFile(openArgs.file,openArgs.tabSize, openArgs.indentSize);
|
||||
this.openClientFile(openArgs.file);
|
||||
responseRequired = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -30,9 +30,7 @@ var Board = (function () {
|
||||
function Board() {
|
||||
}
|
||||
Board.prototype.allShipsSunk = function () {
|
||||
return this.ships.every(function (val) {
|
||||
return val.isSunk;
|
||||
});
|
||||
return this.ships.every(function (val) { return val.isSunk; });
|
||||
};
|
||||
return Board;
|
||||
})();
|
||||
|
||||
@@ -2021,8 +2021,6 @@ function compile(fileNames, options) {
|
||||
}
|
||||
exports.compile = compile;
|
||||
compile(process.argv.slice(2), {
|
||||
noEmitOnError: true,
|
||||
noImplicitAny: true,
|
||||
target: 1 /* ES5 */,
|
||||
module: 1 /* CommonJS */
|
||||
noEmitOnError: true, noImplicitAny: true,
|
||||
target: 1 /* ES5 */, module: 1 /* CommonJS */
|
||||
});
|
||||
|
||||
@@ -2055,7 +2055,8 @@ function delint(sourceFile) {
|
||||
if (ifStatement.thenStatement.kind !== 176 /* Block */) {
|
||||
report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
if (ifStatement.elseStatement && ifStatement.elseStatement.kind !== 176 /* Block */ && ifStatement.elseStatement.kind !== 180 /* IfStatement */) {
|
||||
if (ifStatement.elseStatement &&
|
||||
ifStatement.elseStatement.kind !== 176 /* Block */ && ifStatement.elseStatement.kind !== 180 /* IfStatement */) {
|
||||
report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2051,35 +2051,20 @@ function transform(contents, compilerOptions) {
|
||||
// Create a compilerHost object to allow the compiler to read and write files
|
||||
var compilerHost = {
|
||||
getSourceFile: function (fileName, target) {
|
||||
return files[fileName] !== undefined ? ts.createSourceFile(fileName, files[fileName], target) : undefined;
|
||||
return files[fileName] !== undefined ?
|
||||
ts.createSourceFile(fileName, files[fileName], target) : undefined;
|
||||
},
|
||||
writeFile: function (name, text, writeByteOrderMark) {
|
||||
outputs.push({
|
||||
name: name,
|
||||
text: text,
|
||||
writeByteOrderMark: writeByteOrderMark
|
||||
});
|
||||
outputs.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
||||
},
|
||||
getDefaultLibFileName: function () {
|
||||
return "lib.d.ts";
|
||||
},
|
||||
useCaseSensitiveFileNames: function () {
|
||||
return false;
|
||||
},
|
||||
getCanonicalFileName: function (fileName) {
|
||||
return fileName;
|
||||
},
|
||||
getCurrentDirectory: function () {
|
||||
return "";
|
||||
},
|
||||
getNewLine: function () {
|
||||
return "\n";
|
||||
}
|
||||
getDefaultLibFileName: function () { return "lib.d.ts"; },
|
||||
useCaseSensitiveFileNames: function () { return false; },
|
||||
getCanonicalFileName: function (fileName) { return fileName; },
|
||||
getCurrentDirectory: function () { return ""; },
|
||||
getNewLine: function () { return "\n"; }
|
||||
};
|
||||
// Create a program from inputs
|
||||
var program = ts.createProgram([
|
||||
"file.ts"
|
||||
], compilerOptions, compilerHost);
|
||||
var program = ts.createProgram(["file.ts"], compilerOptions, compilerHost);
|
||||
// Query for early errors
|
||||
var errors = ts.getPreEmitDiagnostics(program);
|
||||
var emitResult = program.emit();
|
||||
@@ -2087,7 +2072,8 @@ function transform(contents, compilerOptions) {
|
||||
return {
|
||||
outputs: outputs,
|
||||
errors: errors.map(function (e) {
|
||||
return e.file.fileName + "(" + (e.file.getLineAndCharacterOfPosition(e.start).line + 1) + "): " + ts.flattenDiagnosticMessageText(e.messageText, os.EOL);
|
||||
return e.file.fileName + "(" + (e.file.getLineAndCharacterOfPosition(e.start).line + 1) + "): "
|
||||
+ ts.flattenDiagnosticMessageText(e.messageText, os.EOL);
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2080,33 +2080,21 @@ function watch(rootFileNames, options) {
|
||||
var files = {};
|
||||
// initialize the list of files
|
||||
rootFileNames.forEach(function (fileName) {
|
||||
files[fileName] = {
|
||||
version: 0
|
||||
};
|
||||
files[fileName] = { version: 0 };
|
||||
});
|
||||
// Create the language service host to allow the LS to communicate with the host
|
||||
var servicesHost = {
|
||||
getScriptFileNames: function () {
|
||||
return rootFileNames;
|
||||
},
|
||||
getScriptVersion: function (fileName) {
|
||||
return files[fileName] && files[fileName].version.toString();
|
||||
},
|
||||
getScriptFileNames: function () { return rootFileNames; },
|
||||
getScriptVersion: function (fileName) { return files[fileName] && files[fileName].version.toString(); },
|
||||
getScriptSnapshot: function (fileName) {
|
||||
if (!fs.existsSync(fileName)) {
|
||||
return undefined;
|
||||
}
|
||||
return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString());
|
||||
},
|
||||
getCurrentDirectory: function () {
|
||||
return process.cwd();
|
||||
},
|
||||
getCompilationSettings: function () {
|
||||
return options;
|
||||
},
|
||||
getDefaultLibFileName: function (options) {
|
||||
return ts.getDefaultLibFilePath(options);
|
||||
}
|
||||
getCurrentDirectory: function () { return process.cwd(); },
|
||||
getCompilationSettings: function () { return options; },
|
||||
getDefaultLibFileName: function (options) { return ts.getDefaultLibFilePath(options); }
|
||||
};
|
||||
// Create the language service files
|
||||
var services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry());
|
||||
@@ -2115,10 +2103,7 @@ function watch(rootFileNames, options) {
|
||||
// First time around, emit all files
|
||||
emitFile(fileName);
|
||||
// Add a watch on the file to handle next change
|
||||
fs.watchFile(fileName, {
|
||||
persistent: true,
|
||||
interval: 250
|
||||
}, function (curr, prev) {
|
||||
fs.watchFile(fileName, { persistent: true, interval: 250 }, function (curr, prev) {
|
||||
// Check timestamp
|
||||
if (+curr.mtime <= +prev.mtime) {
|
||||
return;
|
||||
@@ -2143,7 +2128,9 @@ function watch(rootFileNames, options) {
|
||||
});
|
||||
}
|
||||
function logErrors(fileName) {
|
||||
var allDiagnostics = services.getCompilerOptionsDiagnostics().concat(services.getSyntacticDiagnostics(fileName)).concat(services.getSemanticDiagnostics(fileName));
|
||||
var allDiagnostics = services.getCompilerOptionsDiagnostics()
|
||||
.concat(services.getSyntacticDiagnostics(fileName))
|
||||
.concat(services.getSemanticDiagnostics(fileName));
|
||||
allDiagnostics.forEach(function (diagnostic) {
|
||||
if (diagnostic.file) {
|
||||
var lineChar = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
||||
@@ -2156,10 +2143,7 @@ function watch(rootFileNames, options) {
|
||||
}
|
||||
}
|
||||
// Initialize files constituting the program as all .ts files in the current directory
|
||||
var currentDirectoryFiles = fs.readdirSync(process.cwd()).filter(function (fileName) {
|
||||
return fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts";
|
||||
});
|
||||
var currentDirectoryFiles = fs.readdirSync(process.cwd()).
|
||||
filter(function (fileName) { return fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts"; });
|
||||
// Start the watcher
|
||||
watch(currentDirectoryFiles, {
|
||||
module: 1 /* CommonJS */
|
||||
});
|
||||
watch(currentDirectoryFiles, { module: 1 /* CommonJS */ });
|
||||
|
||||
+1
-4
@@ -17,10 +17,7 @@ var cl = Point.Origin;
|
||||
|
||||
//// [function.js]
|
||||
function Point() {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
return { x: 0, y: 0 };
|
||||
}
|
||||
//// [test.js]
|
||||
var cl;
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
var v = (public x: string) => { };
|
||||
|
||||
//// [ArrowFunctionExpression1.js]
|
||||
var v = function (x) {
|
||||
};
|
||||
var v = function (x) { };
|
||||
|
||||
+2
-5
@@ -58,8 +58,7 @@ var clodule1 = (function () {
|
||||
})();
|
||||
var clodule1;
|
||||
(function (clodule1) {
|
||||
function f(x) {
|
||||
}
|
||||
function f(x) { }
|
||||
})(clodule1 || (clodule1 = {}));
|
||||
var clodule2 = (function () {
|
||||
function clodule2() {
|
||||
@@ -82,9 +81,7 @@ var clodule3 = (function () {
|
||||
})();
|
||||
var clodule3;
|
||||
(function (clodule3) {
|
||||
clodule3.y = {
|
||||
id: T
|
||||
};
|
||||
clodule3.y = { id: T };
|
||||
})(clodule3 || (clodule3 = {}));
|
||||
var clodule4 = (function () {
|
||||
function clodule4() {
|
||||
|
||||
+1
-2
@@ -19,8 +19,7 @@ module clodule {
|
||||
var clodule = (function () {
|
||||
function clodule() {
|
||||
}
|
||||
clodule.fn = function (id) {
|
||||
};
|
||||
clodule.fn = function (id) { };
|
||||
return clodule;
|
||||
})();
|
||||
var clodule;
|
||||
|
||||
+1
-2
@@ -19,8 +19,7 @@ module clodule {
|
||||
var clodule = (function () {
|
||||
function clodule() {
|
||||
}
|
||||
clodule.fn = function (id) {
|
||||
};
|
||||
clodule.fn = function (id) { };
|
||||
return clodule;
|
||||
})();
|
||||
var clodule;
|
||||
|
||||
+1
-3
@@ -19,9 +19,7 @@ module clodule {
|
||||
var clodule = (function () {
|
||||
function clodule() {
|
||||
}
|
||||
clodule.sfn = function (id) {
|
||||
return 42;
|
||||
};
|
||||
clodule.sfn = function (id) { return 42; };
|
||||
return clodule;
|
||||
})();
|
||||
var clodule;
|
||||
|
||||
+4
-18
@@ -28,19 +28,12 @@ var Point = (function () {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
Point.Origin = function () {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
}; // unexpected error here bug 840246
|
||||
Point.Origin = function () { return { x: 0, y: 0 }; }; // unexpected error here bug 840246
|
||||
return Point;
|
||||
})();
|
||||
var Point;
|
||||
(function (Point) {
|
||||
function Origin() {
|
||||
return null;
|
||||
}
|
||||
function Origin() { return null; }
|
||||
Point.Origin = Origin; //expected duplicate identifier error
|
||||
})(Point || (Point = {}));
|
||||
var A;
|
||||
@@ -50,20 +43,13 @@ var A;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
Point.Origin = function () {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
}; // unexpected error here bug 840246
|
||||
Point.Origin = function () { return { x: 0, y: 0 }; }; // unexpected error here bug 840246
|
||||
return Point;
|
||||
})();
|
||||
A.Point = Point;
|
||||
var Point;
|
||||
(function (Point) {
|
||||
function Origin() {
|
||||
return "";
|
||||
}
|
||||
function Origin() { return ""; }
|
||||
Point.Origin = Origin; //expected duplicate identifier error
|
||||
})(Point = A.Point || (A.Point = {}));
|
||||
})(A || (A = {}));
|
||||
|
||||
+4
-18
@@ -28,19 +28,12 @@ var Point = (function () {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
Point.Origin = function () {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
};
|
||||
Point.Origin = function () { return { x: 0, y: 0 }; };
|
||||
return Point;
|
||||
})();
|
||||
var Point;
|
||||
(function (Point) {
|
||||
function Origin() {
|
||||
return "";
|
||||
} // not an error, since not exported
|
||||
function Origin() { return ""; } // not an error, since not exported
|
||||
})(Point || (Point = {}));
|
||||
var A;
|
||||
(function (A) {
|
||||
@@ -49,19 +42,12 @@ var A;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
Point.Origin = function () {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
};
|
||||
Point.Origin = function () { return { x: 0, y: 0 }; };
|
||||
return Point;
|
||||
})();
|
||||
A.Point = Point;
|
||||
var Point;
|
||||
(function (Point) {
|
||||
function Origin() {
|
||||
return "";
|
||||
} // not an error since not exported
|
||||
function Origin() { return ""; } // not an error since not exported
|
||||
})(Point = A.Point || (A.Point = {}));
|
||||
})(A || (A = {}));
|
||||
|
||||
+2
-8
@@ -28,10 +28,7 @@ var Point = (function () {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
Point.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
Point.Origin = { x: 0, y: 0 };
|
||||
return Point;
|
||||
})();
|
||||
var Point;
|
||||
@@ -45,10 +42,7 @@ var A;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
Point.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
Point.Origin = { x: 0, y: 0 };
|
||||
return Point;
|
||||
})();
|
||||
A.Point = Point;
|
||||
|
||||
+2
-8
@@ -28,10 +28,7 @@ var Point = (function () {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
Point.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
Point.Origin = { x: 0, y: 0 };
|
||||
return Point;
|
||||
})();
|
||||
var Point;
|
||||
@@ -45,10 +42,7 @@ var A;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
Point.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
Point.Origin = { x: 0, y: 0 };
|
||||
return Point;
|
||||
})();
|
||||
A.Point = Point;
|
||||
|
||||
@@ -8,7 +8,6 @@ class C {
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.foo = function () {
|
||||
};
|
||||
C.prototype.foo = function () { };
|
||||
return C;
|
||||
})();
|
||||
|
||||
@@ -8,7 +8,6 @@ class C {
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.bar = function () {
|
||||
};
|
||||
C.prototype.bar = function () { };
|
||||
return C;
|
||||
})();
|
||||
|
||||
@@ -8,7 +8,6 @@ class C {
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype[1] = function () {
|
||||
};
|
||||
C.prototype[1] = function () { };
|
||||
return C;
|
||||
})();
|
||||
|
||||
@@ -8,7 +8,6 @@ class C {
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype["bar"] = function () {
|
||||
};
|
||||
C.prototype["bar"] = function () { };
|
||||
return C;
|
||||
})();
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
for (var v of [true]) { }
|
||||
|
||||
//// [ES3For-ofTypeCheck2.js]
|
||||
for (var _i = 0, _a = [
|
||||
true
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [true]; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
}
|
||||
|
||||
@@ -4,11 +4,7 @@ for (var v of ['a', 'b', 'c']) {
|
||||
}
|
||||
|
||||
//// [ES5For-of1.js]
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
console.log(v);
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of1.js.map]
|
||||
{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"}
|
||||
{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"}
|
||||
@@ -8,72 +8,61 @@ sources: ES5For-of1.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of1.js
|
||||
sourceFile:ES5For-of1.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = [
|
||||
>>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^^^
|
||||
9 > ^^
|
||||
10> ^^^
|
||||
11> ^^
|
||||
12> ^^^
|
||||
13> ^
|
||||
14> ^^
|
||||
15> ^^^^^^^^^^^^^^
|
||||
16> ^^
|
||||
17> ^^^^
|
||||
18> ^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var v of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
7 > [
|
||||
8 > 'a'
|
||||
9 > ,
|
||||
10> 'b'
|
||||
11> ,
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> var v
|
||||
16>
|
||||
17> var v of ['a', 'b', 'c']
|
||||
18> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(3, 5) Source(1, 21) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(4, 5) Source(1, 26) + SourceIndex(0)
|
||||
2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > var v
|
||||
4 >
|
||||
5 > var v of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(5, 2) Source(1, 30) + SourceIndex(0)
|
||||
2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0)
|
||||
7 >Emitted(1, 24) Source(1, 16) + SourceIndex(0)
|
||||
8 >Emitted(1, 27) Source(1, 19) + SourceIndex(0)
|
||||
9 >Emitted(1, 29) Source(1, 21) + SourceIndex(0)
|
||||
10>Emitted(1, 32) Source(1, 24) + SourceIndex(0)
|
||||
11>Emitted(1, 34) Source(1, 26) + SourceIndex(0)
|
||||
12>Emitted(1, 37) Source(1, 29) + SourceIndex(0)
|
||||
13>Emitted(1, 38) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 11) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 6) + SourceIndex(0)
|
||||
17>Emitted(1, 60) Source(1, 30) + SourceIndex(0)
|
||||
18>Emitted(1, 61) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _a[_i];
|
||||
1 >^^^^
|
||||
@@ -85,10 +74,10 @@ sourceFile:ES5For-of1.ts
|
||||
2 > var
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0)
|
||||
1 >Emitted(2, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(2, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(2, 19) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> console.log(v);
|
||||
1->^^^^
|
||||
@@ -108,20 +97,20 @@ sourceFile:ES5For-of1.ts
|
||||
6 > v
|
||||
7 > )
|
||||
8 > ;
|
||||
1->Emitted(7, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 12) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(7, 13) Source(2, 13) + SourceIndex(0)
|
||||
4 >Emitted(7, 16) Source(2, 16) + SourceIndex(0)
|
||||
5 >Emitted(7, 17) Source(2, 17) + SourceIndex(0)
|
||||
6 >Emitted(7, 18) Source(2, 18) + SourceIndex(0)
|
||||
7 >Emitted(7, 19) Source(2, 19) + SourceIndex(0)
|
||||
8 >Emitted(7, 20) Source(2, 20) + SourceIndex(0)
|
||||
1->Emitted(3, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(3, 12) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(3, 13) Source(2, 13) + SourceIndex(0)
|
||||
4 >Emitted(3, 16) Source(2, 16) + SourceIndex(0)
|
||||
5 >Emitted(3, 17) Source(2, 17) + SourceIndex(0)
|
||||
6 >Emitted(3, 18) Source(2, 18) + SourceIndex(0)
|
||||
7 >Emitted(3, 19) Source(2, 19) + SourceIndex(0)
|
||||
8 >Emitted(3, 20) Source(2, 20) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(8, 2) Source(3, 2) + SourceIndex(0)
|
||||
1 >Emitted(4, 2) Source(3, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of1.js.map
|
||||
@@ -9,9 +9,7 @@ for (foo().x of []) {
|
||||
|
||||
//// [ES5For-of10.js]
|
||||
function foo() {
|
||||
return {
|
||||
x: 0
|
||||
};
|
||||
return { x: 0 };
|
||||
}
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
foo().x = _a[_i];
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
for ([""] of [[""]]) { }
|
||||
|
||||
//// [ES5For-of12.js]
|
||||
for (var _i = 0, _a = [
|
||||
[
|
||||
""
|
||||
]
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [[""]]; _i < _a.length; _i++) {
|
||||
"" = _a[_i][0];
|
||||
}
|
||||
|
||||
@@ -4,11 +4,7 @@ for (let v of ['a', 'b', 'c']) {
|
||||
}
|
||||
|
||||
//// [ES5For-of13.js]
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var x = v;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of13.js.map]
|
||||
{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"}
|
||||
{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"}
|
||||
@@ -8,72 +8,61 @@ sources: ES5For-of13.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of13.js
|
||||
sourceFile:ES5For-of13.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = [
|
||||
>>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^^^
|
||||
9 > ^^
|
||||
10> ^^^
|
||||
11> ^^
|
||||
12> ^^^
|
||||
13> ^
|
||||
14> ^^
|
||||
15> ^^^^^^^^^^^^^^
|
||||
16> ^^
|
||||
17> ^^^^
|
||||
18> ^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (let v of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
7 > [
|
||||
8 > 'a'
|
||||
9 > ,
|
||||
10> 'b'
|
||||
11> ,
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> let v
|
||||
16>
|
||||
17> let v of ['a', 'b', 'c']
|
||||
18> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(3, 5) Source(1, 21) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(4, 5) Source(1, 26) + SourceIndex(0)
|
||||
2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > let v
|
||||
4 >
|
||||
5 > let v of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(5, 2) Source(1, 30) + SourceIndex(0)
|
||||
2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0)
|
||||
7 >Emitted(1, 24) Source(1, 16) + SourceIndex(0)
|
||||
8 >Emitted(1, 27) Source(1, 19) + SourceIndex(0)
|
||||
9 >Emitted(1, 29) Source(1, 21) + SourceIndex(0)
|
||||
10>Emitted(1, 32) Source(1, 24) + SourceIndex(0)
|
||||
11>Emitted(1, 34) Source(1, 26) + SourceIndex(0)
|
||||
12>Emitted(1, 37) Source(1, 29) + SourceIndex(0)
|
||||
13>Emitted(1, 38) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 11) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 6) + SourceIndex(0)
|
||||
17>Emitted(1, 60) Source(1, 30) + SourceIndex(0)
|
||||
18>Emitted(1, 61) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _a[_i];
|
||||
1 >^^^^
|
||||
@@ -84,10 +73,10 @@ sourceFile:ES5For-of13.ts
|
||||
2 > let
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0)
|
||||
1 >Emitted(2, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(2, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(2, 19) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> var x = v;
|
||||
1 >^^^^
|
||||
@@ -103,18 +92,18 @@ sourceFile:ES5For-of13.ts
|
||||
4 > =
|
||||
5 > v
|
||||
6 > ;
|
||||
1 >Emitted(7, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(7, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(7, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(7, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(7, 15) Source(2, 15) + SourceIndex(0)
|
||||
1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(3, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(3, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(3, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(3, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(3, 15) Source(2, 15) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(8, 2) Source(3, 2) + SourceIndex(0)
|
||||
1 >Emitted(4, 2) Source(3, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of13.js.map
|
||||
@@ -11,9 +11,7 @@ for (let v of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
for (var _b = 0, _c = [
|
||||
v
|
||||
]; _b < _c.length; _b++) {
|
||||
for (var _b = 0, _c = [v]; _b < _c.length; _b++) {
|
||||
var v_1 = _c[_b];
|
||||
var x = v_1;
|
||||
v_1++;
|
||||
|
||||
@@ -10,9 +10,7 @@ for (let v of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var v_1;
|
||||
for (var _b = 0, _c = [
|
||||
v
|
||||
]; _b < _c.length; _b++) {
|
||||
for (var _b = 0, _c = [v]; _b < _c.length; _b++) {
|
||||
var v_2 = _c[_b];
|
||||
var v_3;
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ for (let v of []) {
|
||||
}
|
||||
|
||||
//// [ES5For-of21.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _i_1 = _c[_b];
|
||||
for (var _a = 0, _b = []; _a < _b.length; _a++) {
|
||||
var v = _b[_a];
|
||||
for (var _c = 0, _d = []; _c < _d.length; _c++) {
|
||||
var _i = _d[_c];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,8 @@ for (var x of [1, 2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of22.js]
|
||||
for (var _i = 0, _a = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var x = _a[_i];
|
||||
var _a_1 = 0;
|
||||
for (var _i = 0, _b = [1, 2, 3]; _i < _b.length; _i++) {
|
||||
var x = _b[_i];
|
||||
var _a = 0;
|
||||
console.log(x);
|
||||
}
|
||||
|
||||
@@ -5,11 +5,7 @@ for (var x of [1, 2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of23.js]
|
||||
for (var _i = 0, _b = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]; _i < _b.length; _i++) {
|
||||
for (var _i = 0, _b = [1, 2, 3]; _i < _b.length; _i++) {
|
||||
var x = _b[_i];
|
||||
var _a = 0;
|
||||
console.log(x);
|
||||
|
||||
@@ -5,11 +5,7 @@ for (var v of a) {
|
||||
}
|
||||
|
||||
//// [ES5For-of24.js]
|
||||
var a = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
];
|
||||
var a = [1, 2, 3];
|
||||
for (var _i = 0; _i < a.length; _i++) {
|
||||
var v = a[_i];
|
||||
var a_1 = 0;
|
||||
|
||||
@@ -6,11 +6,7 @@ for (var v of a) {
|
||||
}
|
||||
|
||||
//// [ES5For-of25.js]
|
||||
var a = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
];
|
||||
var a = [1, 2, 3];
|
||||
for (var _i = 0; _i < a.length; _i++) {
|
||||
var v = a[_i];
|
||||
v;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of25.js.map]
|
||||
{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;IAAC,CAAC;IAAE,CAAC;IAAE,CAAC;CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAV,aAAK,EAAL,IAAU,CAAC;IAAX,IAAI,CAAC,GAAI,CAAC,IAAL;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAV,aAAK,EAAL,IAAU,CAAC;IAAX,IAAI,CAAC,GAAI,CAAC,IAAL;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
@@ -8,54 +8,44 @@ sources: ES5For-of25.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of25.js
|
||||
sourceFile:ES5For-of25.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var a = [
|
||||
>>>var a = [1, 2, 3];
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^
|
||||
7 > ^^
|
||||
8 > ^
|
||||
9 > ^^
|
||||
10> ^
|
||||
11> ^
|
||||
12> ^
|
||||
13> ^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >var
|
||||
3 > a
|
||||
4 > =
|
||||
5 > [
|
||||
6 > 1
|
||||
7 > ,
|
||||
8 > 2
|
||||
9 > ,
|
||||
10> 3
|
||||
11> ]
|
||||
12> ;
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0)
|
||||
4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0)
|
||||
---
|
||||
>>> 1,
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 1
|
||||
1 >Emitted(2, 5) Source(1, 10) + SourceIndex(0)
|
||||
2 >Emitted(2, 6) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> 2,
|
||||
1->^^^^
|
||||
2 > ^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 2
|
||||
1->Emitted(3, 5) Source(1, 13) + SourceIndex(0)
|
||||
2 >Emitted(3, 6) Source(1, 14) + SourceIndex(0)
|
||||
---
|
||||
>>> 3
|
||||
1->^^^^
|
||||
2 > ^
|
||||
1->,
|
||||
2 > 3
|
||||
1->Emitted(4, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(4, 6) Source(1, 17) + SourceIndex(0)
|
||||
---
|
||||
>>>];
|
||||
1 >^
|
||||
2 > ^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >]
|
||||
2 > ;
|
||||
1 >Emitted(5, 2) Source(1, 18) + SourceIndex(0)
|
||||
2 >Emitted(5, 3) Source(1, 19) + SourceIndex(0)
|
||||
5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0)
|
||||
6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0)
|
||||
7 >Emitted(1, 13) Source(1, 13) + SourceIndex(0)
|
||||
8 >Emitted(1, 14) Source(1, 14) + SourceIndex(0)
|
||||
9 >Emitted(1, 16) Source(1, 16) + SourceIndex(0)
|
||||
10>Emitted(1, 17) Source(1, 17) + SourceIndex(0)
|
||||
11>Emitted(1, 18) Source(1, 18) + SourceIndex(0)
|
||||
12>Emitted(1, 19) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>>for (var _i = 0; _i < a.length; _i++) {
|
||||
1->
|
||||
@@ -79,16 +69,16 @@ sourceFile:ES5For-of25.ts
|
||||
8 >
|
||||
9 > var v of a
|
||||
10> )
|
||||
1->Emitted(6, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(6, 4) Source(2, 4) + SourceIndex(0)
|
||||
3 >Emitted(6, 5) Source(2, 5) + SourceIndex(0)
|
||||
4 >Emitted(6, 6) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(6, 16) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(6, 18) Source(2, 6) + SourceIndex(0)
|
||||
7 >Emitted(6, 31) Source(2, 11) + SourceIndex(0)
|
||||
8 >Emitted(6, 33) Source(2, 6) + SourceIndex(0)
|
||||
9 >Emitted(6, 37) Source(2, 16) + SourceIndex(0)
|
||||
10>Emitted(6, 38) Source(2, 17) + SourceIndex(0)
|
||||
1->Emitted(2, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(2, 4) Source(2, 4) + SourceIndex(0)
|
||||
3 >Emitted(2, 5) Source(2, 5) + SourceIndex(0)
|
||||
4 >Emitted(2, 6) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(2, 18) Source(2, 6) + SourceIndex(0)
|
||||
7 >Emitted(2, 31) Source(2, 11) + SourceIndex(0)
|
||||
8 >Emitted(2, 33) Source(2, 6) + SourceIndex(0)
|
||||
9 >Emitted(2, 37) Source(2, 16) + SourceIndex(0)
|
||||
10>Emitted(2, 38) Source(2, 17) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = a[_i];
|
||||
1 >^^^^
|
||||
@@ -103,12 +93,12 @@ sourceFile:ES5For-of25.ts
|
||||
4 > of
|
||||
5 > a
|
||||
6 >
|
||||
1 >Emitted(7, 5) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(7, 9) Source(2, 10) + SourceIndex(0)
|
||||
3 >Emitted(7, 10) Source(2, 11) + SourceIndex(0)
|
||||
4 >Emitted(7, 13) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(7, 14) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(7, 18) Source(2, 11) + SourceIndex(0)
|
||||
1 >Emitted(3, 5) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(3, 9) Source(2, 10) + SourceIndex(0)
|
||||
3 >Emitted(3, 10) Source(2, 11) + SourceIndex(0)
|
||||
4 >Emitted(3, 13) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(3, 14) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(3, 18) Source(2, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> v;
|
||||
1 >^^^^
|
||||
@@ -119,9 +109,9 @@ sourceFile:ES5For-of25.ts
|
||||
>
|
||||
2 > v
|
||||
3 > ;
|
||||
1 >Emitted(8, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(8, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(8, 7) Source(3, 7) + SourceIndex(0)
|
||||
1 >Emitted(4, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(4, 7) Source(3, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> a;
|
||||
1->^^^^
|
||||
@@ -131,15 +121,15 @@ sourceFile:ES5For-of25.ts
|
||||
>
|
||||
2 > a
|
||||
3 > ;
|
||||
1->Emitted(9, 5) Source(4, 5) + SourceIndex(0)
|
||||
2 >Emitted(9, 6) Source(4, 6) + SourceIndex(0)
|
||||
3 >Emitted(9, 7) Source(4, 7) + SourceIndex(0)
|
||||
1->Emitted(5, 5) Source(4, 5) + SourceIndex(0)
|
||||
2 >Emitted(5, 6) Source(4, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 7) Source(4, 7) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(10, 2) Source(5, 2) + SourceIndex(0)
|
||||
1 >Emitted(6, 2) Source(5, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of25.js.map
|
||||
@@ -5,10 +5,7 @@ for (var [a = 0, b = 1] of [2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of26.js]
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of26.js.map]
|
||||
{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN;IAAC,CAAC;IAAE,CAAC;CAAC,EAA5B,cAAkB,EAAlB,IAA4B,CAAC;IAA7B,6BAAK,CAAC,mBAAG,CAAC,mBAAE,CAAC,mBAAG,CAAC,KAAC;IACnB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAA5B,cAAkB,EAAlB,IAA4B,CAAC;IAA7B,6BAAK,CAAC,mBAAG,CAAC,mBAAE,CAAC,mBAAG,CAAC,KAAC;IACnB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
@@ -8,64 +8,56 @@ sources: ES5For-of26.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of26.js
|
||||
sourceFile:ES5For-of26.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = [
|
||||
>>>for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^
|
||||
9 > ^^
|
||||
10> ^
|
||||
11> ^
|
||||
12> ^^
|
||||
13> ^^^^^^^^^^^^^^
|
||||
14> ^^
|
||||
15> ^^^^
|
||||
16> ^
|
||||
17> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var [a = 0, b = 1] of
|
||||
5 > [2, 3]
|
||||
6 >
|
||||
7 > [
|
||||
8 > 2
|
||||
9 > ,
|
||||
10> 3
|
||||
11> ]
|
||||
12>
|
||||
13> var [a = 0, b = 1]
|
||||
14>
|
||||
15> var [a = 0, b = 1] of [2, 3]
|
||||
16> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 28) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 34) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 28) + SourceIndex(0)
|
||||
---
|
||||
>>> 2,
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^->
|
||||
1 >[
|
||||
2 > 2
|
||||
1 >Emitted(2, 5) Source(1, 29) + SourceIndex(0)
|
||||
2 >Emitted(2, 6) Source(1, 30) + SourceIndex(0)
|
||||
---
|
||||
>>> 3
|
||||
1->^^^^
|
||||
2 > ^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 3
|
||||
1->Emitted(3, 5) Source(1, 32) + SourceIndex(0)
|
||||
2 >Emitted(3, 6) Source(1, 33) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->]
|
||||
2 >
|
||||
3 > var [a = 0, b = 1]
|
||||
4 >
|
||||
5 > var [a = 0, b = 1] of [2, 3]
|
||||
6 > )
|
||||
1->Emitted(4, 2) Source(1, 34) + SourceIndex(0)
|
||||
2 >Emitted(4, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(4, 18) Source(1, 24) + SourceIndex(0)
|
||||
4 >Emitted(4, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(4, 24) Source(1, 34) + SourceIndex(0)
|
||||
6 >Emitted(4, 25) Source(1, 35) + SourceIndex(0)
|
||||
7 >Emitted(1, 24) Source(1, 29) + SourceIndex(0)
|
||||
8 >Emitted(1, 25) Source(1, 30) + SourceIndex(0)
|
||||
9 >Emitted(1, 27) Source(1, 32) + SourceIndex(0)
|
||||
10>Emitted(1, 28) Source(1, 33) + SourceIndex(0)
|
||||
11>Emitted(1, 29) Source(1, 34) + SourceIndex(0)
|
||||
12>Emitted(1, 31) Source(1, 6) + SourceIndex(0)
|
||||
13>Emitted(1, 45) Source(1, 24) + SourceIndex(0)
|
||||
14>Emitted(1, 47) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 51) Source(1, 34) + SourceIndex(0)
|
||||
16>Emitted(1, 52) Source(1, 35) + SourceIndex(0)
|
||||
---
|
||||
>>> var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
1->^^^^
|
||||
@@ -88,16 +80,16 @@ sourceFile:ES5For-of26.ts
|
||||
8 > =
|
||||
9 > 1
|
||||
10> ]
|
||||
1->Emitted(5, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(5, 34) Source(1, 11) + SourceIndex(0)
|
||||
3 >Emitted(5, 35) Source(1, 12) + SourceIndex(0)
|
||||
4 >Emitted(5, 54) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(5, 55) Source(1, 16) + SourceIndex(0)
|
||||
6 >Emitted(5, 74) Source(1, 18) + SourceIndex(0)
|
||||
7 >Emitted(5, 75) Source(1, 19) + SourceIndex(0)
|
||||
8 >Emitted(5, 94) Source(1, 22) + SourceIndex(0)
|
||||
9 >Emitted(5, 95) Source(1, 23) + SourceIndex(0)
|
||||
10>Emitted(5, 100) Source(1, 24) + SourceIndex(0)
|
||||
1->Emitted(2, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 34) Source(1, 11) + SourceIndex(0)
|
||||
3 >Emitted(2, 35) Source(1, 12) + SourceIndex(0)
|
||||
4 >Emitted(2, 54) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(2, 55) Source(1, 16) + SourceIndex(0)
|
||||
6 >Emitted(2, 74) Source(1, 18) + SourceIndex(0)
|
||||
7 >Emitted(2, 75) Source(1, 19) + SourceIndex(0)
|
||||
8 >Emitted(2, 94) Source(1, 22) + SourceIndex(0)
|
||||
9 >Emitted(2, 95) Source(1, 23) + SourceIndex(0)
|
||||
10>Emitted(2, 100) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> a;
|
||||
1 >^^^^
|
||||
@@ -108,9 +100,9 @@ sourceFile:ES5For-of26.ts
|
||||
>
|
||||
2 > a
|
||||
3 > ;
|
||||
1 >Emitted(6, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(6, 6) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(6, 7) Source(2, 7) + SourceIndex(0)
|
||||
1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(3, 6) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(3, 7) Source(2, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> b;
|
||||
1->^^^^
|
||||
@@ -120,15 +112,15 @@ sourceFile:ES5For-of26.ts
|
||||
>
|
||||
2 > b
|
||||
3 > ;
|
||||
1->Emitted(7, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(7, 7) Source(3, 7) + SourceIndex(0)
|
||||
1->Emitted(4, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(4, 7) Source(3, 7) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(8, 2) Source(4, 2) + SourceIndex(0)
|
||||
1 >Emitted(5, 2) Source(4, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of26.js.map
|
||||
@@ -5,10 +5,7 @@ for (var {x: a = 0, y: b = 1} of [2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of27.js]
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
|
||||
@@ -5,10 +5,7 @@ for (let [a = 0, b = 1] of [2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of28.js]
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
|
||||
@@ -5,10 +5,7 @@ for (const {x: a = 0, y: b = 1} of [2, 3]) {
|
||||
}
|
||||
|
||||
//// [ES5For-of29.js]
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
|
||||
@@ -3,11 +3,7 @@ for (var v of ['a', 'b', 'c'])
|
||||
var x = v;
|
||||
|
||||
//// [ES5For-of3.js]
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var x = v;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of3.js.map]
|
||||
{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"}
|
||||
{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"}
|
||||
@@ -8,72 +8,61 @@ sources: ES5For-of3.ts
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of3.js
|
||||
sourceFile:ES5For-of3.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = [
|
||||
>>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^^^
|
||||
9 > ^^
|
||||
10> ^^^
|
||||
11> ^^
|
||||
12> ^^^
|
||||
13> ^
|
||||
14> ^^
|
||||
15> ^^^^^^^^^^^^^^
|
||||
16> ^^
|
||||
17> ^^^^
|
||||
18> ^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var v of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
7 > [
|
||||
8 > 'a'
|
||||
9 > ,
|
||||
10> 'b'
|
||||
11> ,
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> var v
|
||||
16>
|
||||
17> var v of ['a', 'b', 'c']
|
||||
18> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(3, 5) Source(1, 21) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(4, 5) Source(1, 26) + SourceIndex(0)
|
||||
2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > var v
|
||||
4 >
|
||||
5 > var v of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(5, 2) Source(1, 30) + SourceIndex(0)
|
||||
2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0)
|
||||
7 >Emitted(1, 24) Source(1, 16) + SourceIndex(0)
|
||||
8 >Emitted(1, 27) Source(1, 19) + SourceIndex(0)
|
||||
9 >Emitted(1, 29) Source(1, 21) + SourceIndex(0)
|
||||
10>Emitted(1, 32) Source(1, 24) + SourceIndex(0)
|
||||
11>Emitted(1, 34) Source(1, 26) + SourceIndex(0)
|
||||
12>Emitted(1, 37) Source(1, 29) + SourceIndex(0)
|
||||
13>Emitted(1, 38) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 11) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 6) + SourceIndex(0)
|
||||
17>Emitted(1, 60) Source(1, 30) + SourceIndex(0)
|
||||
18>Emitted(1, 61) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _a[_i];
|
||||
1 >^^^^
|
||||
@@ -84,10 +73,10 @@ sourceFile:ES5For-of3.ts
|
||||
2 > var
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0)
|
||||
1 >Emitted(2, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(2, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(2, 19) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> var x = v;
|
||||
1 >^^^^
|
||||
@@ -103,17 +92,17 @@ sourceFile:ES5For-of3.ts
|
||||
4 > =
|
||||
5 > v
|
||||
6 > ;
|
||||
1 >Emitted(7, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(7, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(7, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(7, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(7, 15) Source(2, 15) + SourceIndex(0)
|
||||
1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(3, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(3, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(3, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(3, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(3, 15) Source(2, 15) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
1 >Emitted(8, 2) Source(2, 15) + SourceIndex(0)
|
||||
1 >Emitted(4, 2) Source(2, 15) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of3.js.map
|
||||
@@ -8,10 +8,7 @@ for ([a = 1, b = ""] of tuple) {
|
||||
|
||||
//// [ES5For-of30.js]
|
||||
var a, b;
|
||||
var tuple = [
|
||||
2,
|
||||
"3"
|
||||
];
|
||||
var tuple = [2, "3"];
|
||||
for (var _i = 0; _i < tuple.length; _i++) {
|
||||
_a = tuple[_i], _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], b = _c === void 0 ? "" : _c;
|
||||
a;
|
||||
|
||||
@@ -10,9 +10,6 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var w = _a[_i];
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var v = _c[_b];
|
||||
var x = [
|
||||
w,
|
||||
v
|
||||
];
|
||||
var x = [w, v];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,5 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
}
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var v = _c[_b];
|
||||
var x = [
|
||||
w,
|
||||
v
|
||||
];
|
||||
var x = [w, v];
|
||||
}
|
||||
|
||||
@@ -8,15 +8,9 @@ for (foo().x of ['a', 'b', 'c']) {
|
||||
|
||||
//// [ES5For-of8.js]
|
||||
function foo() {
|
||||
return {
|
||||
x: 0
|
||||
};
|
||||
return { x: 0 };
|
||||
}
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
foo().x = _a[_i];
|
||||
var p = foo().x;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of8.js.map]
|
||||
{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":["foo"],"mappings":"AAAA;IACIA,MAAMA,CAACA;QAAEA,CAACA,EAAEA,CAACA;KAAEA,CAACA;AACpBA,CAACA;AACD,GAAG,CAAC,CAAY,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAA1B,cAAO,EAAP,IAA0B,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"}
|
||||
{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":["foo"],"mappings":"AAAA;IACIA,MAAMA,CAACA,EAAEA,CAACA,EAAEA,CAACA,EAAEA,CAACA;AACpBA,CAACA;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAA1B,cAAO,EAAP,IAA0B,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"}
|
||||
@@ -10,62 +10,69 @@ sourceFile:ES5For-of8.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>function foo() {
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^->
|
||||
2 >^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
---
|
||||
>>> return {
|
||||
>>> return { x: 0 };
|
||||
1->^^^^
|
||||
2 > ^^^^^^
|
||||
3 > ^
|
||||
4 > ^^->
|
||||
4 > ^^
|
||||
5 > ^
|
||||
6 > ^^
|
||||
7 > ^
|
||||
8 > ^^
|
||||
9 > ^
|
||||
1->function foo() {
|
||||
>
|
||||
2 > return
|
||||
3 >
|
||||
4 > {
|
||||
5 > x
|
||||
6 > :
|
||||
7 > 0
|
||||
8 > }
|
||||
9 > ;
|
||||
1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) name (foo)
|
||||
3 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>> x: 0
|
||||
1->^^^^^^^^
|
||||
2 > ^
|
||||
3 > ^^
|
||||
4 > ^
|
||||
1->{
|
||||
2 > x
|
||||
3 > :
|
||||
4 > 0
|
||||
1->Emitted(3, 9) Source(2, 14) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(3, 10) Source(2, 15) + SourceIndex(0) name (foo)
|
||||
3 >Emitted(3, 12) Source(2, 17) + SourceIndex(0) name (foo)
|
||||
4 >Emitted(3, 13) Source(2, 18) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>> };
|
||||
1 >^^^^^
|
||||
2 > ^
|
||||
1 > }
|
||||
2 > ;
|
||||
1 >Emitted(4, 6) Source(2, 20) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(4, 7) Source(2, 21) + SourceIndex(0) name (foo)
|
||||
4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) name (foo)
|
||||
5 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) name (foo)
|
||||
6 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) name (foo)
|
||||
7 >Emitted(2, 18) Source(2, 18) + SourceIndex(0) name (foo)
|
||||
8 >Emitted(2, 20) Source(2, 20) + SourceIndex(0) name (foo)
|
||||
9 >Emitted(2, 21) Source(2, 21) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>>}
|
||||
1 >
|
||||
2 >^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>
|
||||
2 >}
|
||||
1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) name (foo)
|
||||
1 >Emitted(3, 1) Source(3, 1) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(3, 2) Source(3, 2) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>>for (var _i = 0, _a = [
|
||||
>>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) {
|
||||
1->
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^
|
||||
8 > ^^^
|
||||
9 > ^^
|
||||
10> ^^^
|
||||
11> ^^
|
||||
12> ^^^
|
||||
13> ^
|
||||
14> ^^
|
||||
15> ^^^^^^^^^^^^^^
|
||||
16> ^^
|
||||
17> ^^^^
|
||||
18> ^
|
||||
1->
|
||||
>
|
||||
2 >for
|
||||
@@ -73,59 +80,36 @@ sourceFile:ES5For-of8.ts
|
||||
4 > (foo().x of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
1->Emitted(6, 1) Source(4, 1) + SourceIndex(0)
|
||||
2 >Emitted(6, 4) Source(4, 4) + SourceIndex(0)
|
||||
3 >Emitted(6, 5) Source(4, 5) + SourceIndex(0)
|
||||
4 >Emitted(6, 6) Source(4, 17) + SourceIndex(0)
|
||||
5 >Emitted(6, 16) Source(4, 32) + SourceIndex(0)
|
||||
6 >Emitted(6, 18) Source(4, 17) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(7, 5) Source(4, 18) + SourceIndex(0)
|
||||
2 >Emitted(7, 8) Source(4, 21) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(8, 5) Source(4, 23) + SourceIndex(0)
|
||||
2 >Emitted(8, 8) Source(4, 26) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(9, 5) Source(4, 28) + SourceIndex(0)
|
||||
2 >Emitted(9, 8) Source(4, 31) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > foo().x
|
||||
4 >
|
||||
5 > foo().x of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(10, 2) Source(4, 32) + SourceIndex(0)
|
||||
2 >Emitted(10, 4) Source(4, 6) + SourceIndex(0)
|
||||
3 >Emitted(10, 18) Source(4, 13) + SourceIndex(0)
|
||||
4 >Emitted(10, 20) Source(4, 6) + SourceIndex(0)
|
||||
5 >Emitted(10, 24) Source(4, 32) + SourceIndex(0)
|
||||
6 >Emitted(10, 25) Source(4, 33) + SourceIndex(0)
|
||||
7 > [
|
||||
8 > 'a'
|
||||
9 > ,
|
||||
10> 'b'
|
||||
11> ,
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> foo().x
|
||||
16>
|
||||
17> foo().x of ['a', 'b', 'c']
|
||||
18> )
|
||||
1->Emitted(4, 1) Source(4, 1) + SourceIndex(0)
|
||||
2 >Emitted(4, 4) Source(4, 4) + SourceIndex(0)
|
||||
3 >Emitted(4, 5) Source(4, 5) + SourceIndex(0)
|
||||
4 >Emitted(4, 6) Source(4, 17) + SourceIndex(0)
|
||||
5 >Emitted(4, 16) Source(4, 32) + SourceIndex(0)
|
||||
6 >Emitted(4, 18) Source(4, 17) + SourceIndex(0)
|
||||
7 >Emitted(4, 24) Source(4, 18) + SourceIndex(0)
|
||||
8 >Emitted(4, 27) Source(4, 21) + SourceIndex(0)
|
||||
9 >Emitted(4, 29) Source(4, 23) + SourceIndex(0)
|
||||
10>Emitted(4, 32) Source(4, 26) + SourceIndex(0)
|
||||
11>Emitted(4, 34) Source(4, 28) + SourceIndex(0)
|
||||
12>Emitted(4, 37) Source(4, 31) + SourceIndex(0)
|
||||
13>Emitted(4, 38) Source(4, 32) + SourceIndex(0)
|
||||
14>Emitted(4, 40) Source(4, 6) + SourceIndex(0)
|
||||
15>Emitted(4, 54) Source(4, 13) + SourceIndex(0)
|
||||
16>Emitted(4, 56) Source(4, 6) + SourceIndex(0)
|
||||
17>Emitted(4, 60) Source(4, 32) + SourceIndex(0)
|
||||
18>Emitted(4, 61) Source(4, 33) + SourceIndex(0)
|
||||
---
|
||||
>>> foo().x = _a[_i];
|
||||
1 >^^^^
|
||||
@@ -141,12 +125,12 @@ sourceFile:ES5For-of8.ts
|
||||
4 > .
|
||||
5 > x
|
||||
6 >
|
||||
1 >Emitted(11, 5) Source(4, 6) + SourceIndex(0)
|
||||
2 >Emitted(11, 8) Source(4, 9) + SourceIndex(0)
|
||||
3 >Emitted(11, 10) Source(4, 11) + SourceIndex(0)
|
||||
4 >Emitted(11, 11) Source(4, 12) + SourceIndex(0)
|
||||
5 >Emitted(11, 12) Source(4, 13) + SourceIndex(0)
|
||||
6 >Emitted(11, 21) Source(4, 13) + SourceIndex(0)
|
||||
1 >Emitted(5, 5) Source(4, 6) + SourceIndex(0)
|
||||
2 >Emitted(5, 8) Source(4, 9) + SourceIndex(0)
|
||||
3 >Emitted(5, 10) Source(4, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 11) Source(4, 12) + SourceIndex(0)
|
||||
5 >Emitted(5, 12) Source(4, 13) + SourceIndex(0)
|
||||
6 >Emitted(5, 21) Source(4, 13) + SourceIndex(0)
|
||||
---
|
||||
>>> var p = foo().x;
|
||||
1->^^^^
|
||||
@@ -168,21 +152,21 @@ sourceFile:ES5For-of8.ts
|
||||
7 > .
|
||||
8 > x
|
||||
9 > ;
|
||||
1->Emitted(12, 5) Source(5, 5) + SourceIndex(0)
|
||||
2 >Emitted(12, 9) Source(5, 9) + SourceIndex(0)
|
||||
3 >Emitted(12, 10) Source(5, 10) + SourceIndex(0)
|
||||
4 >Emitted(12, 13) Source(5, 13) + SourceIndex(0)
|
||||
5 >Emitted(12, 16) Source(5, 16) + SourceIndex(0)
|
||||
6 >Emitted(12, 18) Source(5, 18) + SourceIndex(0)
|
||||
7 >Emitted(12, 19) Source(5, 19) + SourceIndex(0)
|
||||
8 >Emitted(12, 20) Source(5, 20) + SourceIndex(0)
|
||||
9 >Emitted(12, 21) Source(5, 21) + SourceIndex(0)
|
||||
1->Emitted(6, 5) Source(5, 5) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(5, 9) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(5, 10) + SourceIndex(0)
|
||||
4 >Emitted(6, 13) Source(5, 13) + SourceIndex(0)
|
||||
5 >Emitted(6, 16) Source(5, 16) + SourceIndex(0)
|
||||
6 >Emitted(6, 18) Source(5, 18) + SourceIndex(0)
|
||||
7 >Emitted(6, 19) Source(5, 19) + SourceIndex(0)
|
||||
8 >Emitted(6, 20) Source(5, 20) + SourceIndex(0)
|
||||
9 >Emitted(6, 21) Source(5, 21) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(13, 2) Source(6, 2) + SourceIndex(0)
|
||||
1 >Emitted(7, 2) Source(6, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of8.js.map
|
||||
@@ -10,9 +10,7 @@ for (foo().x of []) {
|
||||
|
||||
//// [ES5For-of9.js]
|
||||
function foo() {
|
||||
return {
|
||||
x: 0
|
||||
};
|
||||
return { x: 0 };
|
||||
}
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
foo().x = _a[_i];
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
for (var v of [true]) { }
|
||||
|
||||
//// [ES5For-ofTypeCheck2.js]
|
||||
for (var _i = 0, _a = [
|
||||
true
|
||||
]; _i < _a.length; _i++) {
|
||||
for (var _i = 0, _a = [true]; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
}
|
||||
|
||||
@@ -3,10 +3,7 @@ var tuple: [string, number] = ["", 0];
|
||||
for (var v of tuple) { }
|
||||
|
||||
//// [ES5For-ofTypeCheck3.js]
|
||||
var tuple = [
|
||||
"",
|
||||
0
|
||||
];
|
||||
var tuple = ["", 0];
|
||||
for (var _i = 0; _i < tuple.length; _i++) {
|
||||
var v = tuple[_i];
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@ var M;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype[Symbol.iterator] = function () {
|
||||
};
|
||||
C.prototype[Symbol.iterator] = function () { };
|
||||
return C;
|
||||
})();
|
||||
M.C = C;
|
||||
|
||||
@@ -12,8 +12,7 @@ var Symbol;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype[Symbol.iterator] = function () {
|
||||
};
|
||||
C.prototype[Symbol.iterator] = function () { };
|
||||
return C;
|
||||
})();
|
||||
(new C)[Symbol.iterator];
|
||||
|
||||
@@ -12,8 +12,7 @@ var Symbol;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype[Symbol.iterator] = function () {
|
||||
};
|
||||
C.prototype[Symbol.iterator] = function () { };
|
||||
return C;
|
||||
})();
|
||||
(new C)[Symbol.iterator];
|
||||
|
||||
@@ -12,8 +12,7 @@ var Symbol;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype[Symbol.iterator] = function () {
|
||||
};
|
||||
C.prototype[Symbol.iterator] = function () { };
|
||||
return C;
|
||||
})();
|
||||
(new C)[Symbol.iterator](0); // Should error
|
||||
|
||||
@@ -9,8 +9,7 @@ class C {
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype[Symbol.iterator] = function () {
|
||||
};
|
||||
C.prototype[Symbol.iterator] = function () { };
|
||||
return C;
|
||||
})();
|
||||
(new C)[Symbol.iterator];
|
||||
|
||||
@@ -12,8 +12,7 @@ var Symbol;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype[Symbol.iterator] = function () {
|
||||
};
|
||||
C.prototype[Symbol.iterator] = function () { };
|
||||
return C;
|
||||
})();
|
||||
(new C)[Symbol.iterator];
|
||||
|
||||
+2
-9
@@ -35,10 +35,7 @@ var A;
|
||||
return Point;
|
||||
})();
|
||||
A.Point = Point;
|
||||
A.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
A.Origin = { x: 0, y: 0 };
|
||||
var Point3d = (function (_super) {
|
||||
__extends(Point3d, _super);
|
||||
function Point3d() {
|
||||
@@ -47,11 +44,7 @@ var A;
|
||||
return Point3d;
|
||||
})(Point);
|
||||
A.Point3d = Point3d;
|
||||
A.Origin3d = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0
|
||||
};
|
||||
A.Origin3d = { x: 0, y: 0, z: 0 };
|
||||
var Line = (function () {
|
||||
function Line(start, end) {
|
||||
this.start = start;
|
||||
|
||||
+2
-9
@@ -38,10 +38,7 @@ var A;
|
||||
}
|
||||
return Point;
|
||||
})();
|
||||
A.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
A.Origin = { x: 0, y: 0 };
|
||||
var Point3d = (function (_super) {
|
||||
__extends(Point3d, _super);
|
||||
function Point3d() {
|
||||
@@ -50,11 +47,7 @@ var A;
|
||||
return Point3d;
|
||||
})(Point);
|
||||
A.Point3d = Point3d;
|
||||
A.Origin3d = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0
|
||||
};
|
||||
A.Origin3d = { x: 0, y: 0, z: 0 };
|
||||
var Line = (function () {
|
||||
function Line(start, end) {
|
||||
this.start = start;
|
||||
|
||||
+1
-4
@@ -33,10 +33,7 @@ var A;
|
||||
})();
|
||||
A.Line = Line;
|
||||
function fromOrigin(p) {
|
||||
return new Line({
|
||||
x: 0,
|
||||
y: 0
|
||||
}, p);
|
||||
return new Line({ x: 0, y: 0 }, p);
|
||||
}
|
||||
A.fromOrigin = fromOrigin;
|
||||
})(A || (A = {}));
|
||||
|
||||
+1
-4
@@ -32,10 +32,7 @@ var A;
|
||||
})();
|
||||
A.Line = Line;
|
||||
function fromOrigin(p) {
|
||||
return new Line({
|
||||
x: 0,
|
||||
y: 0
|
||||
}, p);
|
||||
return new Line({ x: 0, y: 0 }, p);
|
||||
}
|
||||
A.fromOrigin = fromOrigin;
|
||||
})(A || (A = {}));
|
||||
|
||||
+1
-4
@@ -32,10 +32,7 @@ var A;
|
||||
return Line;
|
||||
})();
|
||||
function fromOrigin(p) {
|
||||
return new Line({
|
||||
x: 0,
|
||||
y: 0
|
||||
}, p);
|
||||
return new Line({ x: 0, y: 0 }, p);
|
||||
}
|
||||
A.fromOrigin = fromOrigin;
|
||||
})(A || (A = {}));
|
||||
|
||||
+2
-9
@@ -25,13 +25,6 @@ module A {
|
||||
//// [ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js]
|
||||
var A;
|
||||
(function (A) {
|
||||
A.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
A.Origin3d = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0
|
||||
};
|
||||
A.Origin = { x: 0, y: 0 };
|
||||
A.Origin3d = { x: 0, y: 0, z: 0 };
|
||||
})(A || (A = {}));
|
||||
|
||||
+2
-9
@@ -26,13 +26,6 @@ module A {
|
||||
//// [ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js]
|
||||
var A;
|
||||
(function (A) {
|
||||
A.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
A.Origin3d = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0
|
||||
};
|
||||
A.Origin = { x: 0, y: 0 };
|
||||
A.Origin3d = { x: 0, y: 0, z: 0 };
|
||||
})(A || (A = {}));
|
||||
|
||||
@@ -38,10 +38,7 @@ var A;
|
||||
function Line(start, end) {
|
||||
}
|
||||
Line.fromOrigin = function (p) {
|
||||
return new Line({
|
||||
x: 0,
|
||||
y: 0
|
||||
}, p);
|
||||
return new Line({ x: 0, y: 0 }, p);
|
||||
};
|
||||
return Line;
|
||||
})();
|
||||
|
||||
+2
-8
@@ -21,12 +21,6 @@ var A;
|
||||
}
|
||||
return Point;
|
||||
})();
|
||||
A.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
A.Unity = {
|
||||
start: new Point(0, 0),
|
||||
end: new Point(1, 0)
|
||||
};
|
||||
A.Origin = { x: 0, y: 0 };
|
||||
A.Unity = { start: new Point(0, 0), end: new Point(1, 0) };
|
||||
})(A || (A = {}));
|
||||
|
||||
@@ -15,8 +15,5 @@ module A {
|
||||
var A;
|
||||
(function (A) {
|
||||
// valid since Point is exported
|
||||
A.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
A.Origin = { x: 0, y: 0 };
|
||||
})(A || (A = {}));
|
||||
|
||||
@@ -22,14 +22,7 @@ module A {
|
||||
var A;
|
||||
(function (A) {
|
||||
// valid since Point is exported
|
||||
A.Origin = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
A.Origin = { x: 0, y: 0 };
|
||||
// invalid Point3d is not exported
|
||||
A.Origin3d = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0
|
||||
};
|
||||
A.Origin3d = { x: 0, y: 0, z: 0 };
|
||||
})(A || (A = {}));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user