Update tests to use new symbol keyword

This commit is contained in:
Jason Freeman
2015-02-06 21:32:05 -08:00
parent e508bf7e86
commit ebdd96bacf
55 changed files with 969 additions and 814 deletions
+96 -95
View File
@@ -179,110 +179,111 @@ declare module "typescript" {
NumberKeyword = 117,
SetKeyword = 118,
StringKeyword = 119,
TypeKeyword = 120,
QualifiedName = 121,
ComputedPropertyName = 122,
TypeParameter = 123,
Parameter = 124,
PropertySignature = 125,
PropertyDeclaration = 126,
MethodSignature = 127,
MethodDeclaration = 128,
Constructor = 129,
GetAccessor = 130,
SetAccessor = 131,
CallSignature = 132,
ConstructSignature = 133,
IndexSignature = 134,
TypeReference = 135,
FunctionType = 136,
ConstructorType = 137,
TypeQuery = 138,
TypeLiteral = 139,
ArrayType = 140,
TupleType = 141,
UnionType = 142,
ParenthesizedType = 143,
ObjectBindingPattern = 144,
ArrayBindingPattern = 145,
BindingElement = 146,
ArrayLiteralExpression = 147,
ObjectLiteralExpression = 148,
PropertyAccessExpression = 149,
ElementAccessExpression = 150,
CallExpression = 151,
NewExpression = 152,
TaggedTemplateExpression = 153,
TypeAssertionExpression = 154,
ParenthesizedExpression = 155,
FunctionExpression = 156,
ArrowFunction = 157,
DeleteExpression = 158,
TypeOfExpression = 159,
VoidExpression = 160,
PrefixUnaryExpression = 161,
PostfixUnaryExpression = 162,
BinaryExpression = 163,
ConditionalExpression = 164,
TemplateExpression = 165,
YieldExpression = 166,
SpreadElementExpression = 167,
OmittedExpression = 168,
TemplateSpan = 169,
Block = 170,
VariableStatement = 171,
EmptyStatement = 172,
ExpressionStatement = 173,
IfStatement = 174,
DoStatement = 175,
WhileStatement = 176,
ForStatement = 177,
ForInStatement = 178,
ContinueStatement = 179,
BreakStatement = 180,
ReturnStatement = 181,
WithStatement = 182,
SwitchStatement = 183,
LabeledStatement = 184,
ThrowStatement = 185,
TryStatement = 186,
DebuggerStatement = 187,
VariableDeclaration = 188,
VariableDeclarationList = 189,
FunctionDeclaration = 190,
ClassDeclaration = 191,
InterfaceDeclaration = 192,
TypeAliasDeclaration = 193,
EnumDeclaration = 194,
ModuleDeclaration = 195,
ModuleBlock = 196,
ImportDeclaration = 197,
ExportAssignment = 198,
ExternalModuleReference = 199,
CaseClause = 200,
DefaultClause = 201,
HeritageClause = 202,
CatchClause = 203,
PropertyAssignment = 204,
ShorthandPropertyAssignment = 205,
EnumMember = 206,
SourceFile = 207,
SyntaxList = 208,
Count = 209,
SymbolKeyword = 120,
TypeKeyword = 121,
QualifiedName = 122,
ComputedPropertyName = 123,
TypeParameter = 124,
Parameter = 125,
PropertySignature = 126,
PropertyDeclaration = 127,
MethodSignature = 128,
MethodDeclaration = 129,
Constructor = 130,
GetAccessor = 131,
SetAccessor = 132,
CallSignature = 133,
ConstructSignature = 134,
IndexSignature = 135,
TypeReference = 136,
FunctionType = 137,
ConstructorType = 138,
TypeQuery = 139,
TypeLiteral = 140,
ArrayType = 141,
TupleType = 142,
UnionType = 143,
ParenthesizedType = 144,
ObjectBindingPattern = 145,
ArrayBindingPattern = 146,
BindingElement = 147,
ArrayLiteralExpression = 148,
ObjectLiteralExpression = 149,
PropertyAccessExpression = 150,
ElementAccessExpression = 151,
CallExpression = 152,
NewExpression = 153,
TaggedTemplateExpression = 154,
TypeAssertionExpression = 155,
ParenthesizedExpression = 156,
FunctionExpression = 157,
ArrowFunction = 158,
DeleteExpression = 159,
TypeOfExpression = 160,
VoidExpression = 161,
PrefixUnaryExpression = 162,
PostfixUnaryExpression = 163,
BinaryExpression = 164,
ConditionalExpression = 165,
TemplateExpression = 166,
YieldExpression = 167,
SpreadElementExpression = 168,
OmittedExpression = 169,
TemplateSpan = 170,
Block = 171,
VariableStatement = 172,
EmptyStatement = 173,
ExpressionStatement = 174,
IfStatement = 175,
DoStatement = 176,
WhileStatement = 177,
ForStatement = 178,
ForInStatement = 179,
ContinueStatement = 180,
BreakStatement = 181,
ReturnStatement = 182,
WithStatement = 183,
SwitchStatement = 184,
LabeledStatement = 185,
ThrowStatement = 186,
TryStatement = 187,
DebuggerStatement = 188,
VariableDeclaration = 189,
VariableDeclarationList = 190,
FunctionDeclaration = 191,
ClassDeclaration = 192,
InterfaceDeclaration = 193,
TypeAliasDeclaration = 194,
EnumDeclaration = 195,
ModuleDeclaration = 196,
ModuleBlock = 197,
ImportDeclaration = 198,
ExportAssignment = 199,
ExternalModuleReference = 200,
CaseClause = 201,
DefaultClause = 202,
HeritageClause = 203,
CatchClause = 204,
PropertyAssignment = 205,
ShorthandPropertyAssignment = 206,
EnumMember = 207,
SourceFile = 208,
SyntaxList = 209,
Count = 210,
FirstAssignment = 52,
LastAssignment = 63,
FirstReservedWord = 65,
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 120,
LastKeyword = 121,
FirstFutureReservedWord = 101,
LastFutureReservedWord = 109,
FirstTypeNode = 135,
LastTypeNode = 143,
FirstTypeNode = 136,
LastTypeNode = 144,
FirstPunctuation = 14,
LastPunctuation = 63,
FirstToken = 0,
LastToken = 120,
LastToken = 121,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
@@ -291,7 +292,7 @@ declare module "typescript" {
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 63,
FirstNode = 121,
FirstNode = 122,
}
const enum NodeFlags {
Export = 1,
@@ -553,274 +553,277 @@ declare module "typescript" {
StringKeyword = 119,␍
>StringKeyword : SyntaxKind
TypeKeyword = 120,␍
SymbolKeyword = 120,␍
>SymbolKeyword : SyntaxKind
TypeKeyword = 121,␍
>TypeKeyword : SyntaxKind
QualifiedName = 121,␍
QualifiedName = 122,␍
>QualifiedName : SyntaxKind
ComputedPropertyName = 122,␍
ComputedPropertyName = 123,␍
>ComputedPropertyName : SyntaxKind
TypeParameter = 123,␍
TypeParameter = 124,␍
>TypeParameter : SyntaxKind
Parameter = 124,␍
Parameter = 125,␍
>Parameter : SyntaxKind
PropertySignature = 125,␍
PropertySignature = 126,␍
>PropertySignature : SyntaxKind
PropertyDeclaration = 126,␍
PropertyDeclaration = 127,␍
>PropertyDeclaration : SyntaxKind
MethodSignature = 127,␍
MethodSignature = 128,␍
>MethodSignature : SyntaxKind
MethodDeclaration = 128,␍
MethodDeclaration = 129,␍
>MethodDeclaration : SyntaxKind
Constructor = 129,␍
Constructor = 130,␍
>Constructor : SyntaxKind
GetAccessor = 130,␍
GetAccessor = 131,␍
>GetAccessor : SyntaxKind
SetAccessor = 131,␍
SetAccessor = 132,␍
>SetAccessor : SyntaxKind
CallSignature = 132,␍
CallSignature = 133,␍
>CallSignature : SyntaxKind
ConstructSignature = 133,␍
ConstructSignature = 134,␍
>ConstructSignature : SyntaxKind
IndexSignature = 134,␍
IndexSignature = 135,␍
>IndexSignature : SyntaxKind
TypeReference = 135,␍
TypeReference = 136,␍
>TypeReference : SyntaxKind
FunctionType = 136,␍
FunctionType = 137,␍
>FunctionType : SyntaxKind
ConstructorType = 137,␍
ConstructorType = 138,␍
>ConstructorType : SyntaxKind
TypeQuery = 138,␍
TypeQuery = 139,␍
>TypeQuery : SyntaxKind
TypeLiteral = 139,␍
TypeLiteral = 140,␍
>TypeLiteral : SyntaxKind
ArrayType = 140,␍
ArrayType = 141,␍
>ArrayType : SyntaxKind
TupleType = 141,␍
TupleType = 142,␍
>TupleType : SyntaxKind
UnionType = 142,␍
UnionType = 143,␍
>UnionType : SyntaxKind
ParenthesizedType = 143,␍
ParenthesizedType = 144,␍
>ParenthesizedType : SyntaxKind
ObjectBindingPattern = 144,␍
ObjectBindingPattern = 145,␍
>ObjectBindingPattern : SyntaxKind
ArrayBindingPattern = 145,␍
ArrayBindingPattern = 146,␍
>ArrayBindingPattern : SyntaxKind
BindingElement = 146,␍
BindingElement = 147,␍
>BindingElement : SyntaxKind
ArrayLiteralExpression = 147,␍
ArrayLiteralExpression = 148,␍
>ArrayLiteralExpression : SyntaxKind
ObjectLiteralExpression = 148,␍
ObjectLiteralExpression = 149,␍
>ObjectLiteralExpression : SyntaxKind
PropertyAccessExpression = 149,␍
PropertyAccessExpression = 150,␍
>PropertyAccessExpression : SyntaxKind
ElementAccessExpression = 150,␍
ElementAccessExpression = 151,␍
>ElementAccessExpression : SyntaxKind
CallExpression = 151,␍
CallExpression = 152,␍
>CallExpression : SyntaxKind
NewExpression = 152,␍
NewExpression = 153,␍
>NewExpression : SyntaxKind
TaggedTemplateExpression = 153,␍
TaggedTemplateExpression = 154,␍
>TaggedTemplateExpression : SyntaxKind
TypeAssertionExpression = 154,␍
TypeAssertionExpression = 155,␍
>TypeAssertionExpression : SyntaxKind
ParenthesizedExpression = 155,␍
ParenthesizedExpression = 156,␍
>ParenthesizedExpression : SyntaxKind
FunctionExpression = 156,␍
FunctionExpression = 157,␍
>FunctionExpression : SyntaxKind
ArrowFunction = 157,␍
ArrowFunction = 158,␍
>ArrowFunction : SyntaxKind
DeleteExpression = 158,␍
DeleteExpression = 159,␍
>DeleteExpression : SyntaxKind
TypeOfExpression = 159,␍
TypeOfExpression = 160,␍
>TypeOfExpression : SyntaxKind
VoidExpression = 160,␍
VoidExpression = 161,␍
>VoidExpression : SyntaxKind
PrefixUnaryExpression = 161,␍
PrefixUnaryExpression = 162,␍
>PrefixUnaryExpression : SyntaxKind
PostfixUnaryExpression = 162,␍
PostfixUnaryExpression = 163,␍
>PostfixUnaryExpression : SyntaxKind
BinaryExpression = 163,␍
BinaryExpression = 164,␍
>BinaryExpression : SyntaxKind
ConditionalExpression = 164,␍
ConditionalExpression = 165,␍
>ConditionalExpression : SyntaxKind
TemplateExpression = 165,␍
TemplateExpression = 166,␍
>TemplateExpression : SyntaxKind
YieldExpression = 166,␍
YieldExpression = 167,␍
>YieldExpression : SyntaxKind
SpreadElementExpression = 167,␍
SpreadElementExpression = 168,␍
>SpreadElementExpression : SyntaxKind
OmittedExpression = 168,␍
OmittedExpression = 169,␍
>OmittedExpression : SyntaxKind
TemplateSpan = 169,␍
TemplateSpan = 170,␍
>TemplateSpan : SyntaxKind
Block = 170,␍
Block = 171,␍
>Block : SyntaxKind
VariableStatement = 171,␍
VariableStatement = 172,␍
>VariableStatement : SyntaxKind
EmptyStatement = 172,␍
EmptyStatement = 173,␍
>EmptyStatement : SyntaxKind
ExpressionStatement = 173,␍
ExpressionStatement = 174,␍
>ExpressionStatement : SyntaxKind
IfStatement = 174,␍
IfStatement = 175,␍
>IfStatement : SyntaxKind
DoStatement = 175,␍
DoStatement = 176,␍
>DoStatement : SyntaxKind
WhileStatement = 176,␍
WhileStatement = 177,␍
>WhileStatement : SyntaxKind
ForStatement = 177,␍
ForStatement = 178,␍
>ForStatement : SyntaxKind
ForInStatement = 178,␍
ForInStatement = 179,␍
>ForInStatement : SyntaxKind
ContinueStatement = 179,␍
ContinueStatement = 180,␍
>ContinueStatement : SyntaxKind
BreakStatement = 180,␍
BreakStatement = 181,␍
>BreakStatement : SyntaxKind
ReturnStatement = 181,␍
ReturnStatement = 182,␍
>ReturnStatement : SyntaxKind
WithStatement = 182,␍
WithStatement = 183,␍
>WithStatement : SyntaxKind
SwitchStatement = 183,␍
SwitchStatement = 184,␍
>SwitchStatement : SyntaxKind
LabeledStatement = 184,␍
LabeledStatement = 185,␍
>LabeledStatement : SyntaxKind
ThrowStatement = 185,␍
ThrowStatement = 186,␍
>ThrowStatement : SyntaxKind
TryStatement = 186,␍
TryStatement = 187,␍
>TryStatement : SyntaxKind
DebuggerStatement = 187,␍
DebuggerStatement = 188,␍
>DebuggerStatement : SyntaxKind
VariableDeclaration = 188,␍
VariableDeclaration = 189,␍
>VariableDeclaration : SyntaxKind
VariableDeclarationList = 189,␍
VariableDeclarationList = 190,␍
>VariableDeclarationList : SyntaxKind
FunctionDeclaration = 190,␍
FunctionDeclaration = 191,␍
>FunctionDeclaration : SyntaxKind
ClassDeclaration = 191,␍
ClassDeclaration = 192,␍
>ClassDeclaration : SyntaxKind
InterfaceDeclaration = 192,␍
InterfaceDeclaration = 193,␍
>InterfaceDeclaration : SyntaxKind
TypeAliasDeclaration = 193,␍
TypeAliasDeclaration = 194,␍
>TypeAliasDeclaration : SyntaxKind
EnumDeclaration = 194,␍
EnumDeclaration = 195,␍
>EnumDeclaration : SyntaxKind
ModuleDeclaration = 195,␍
ModuleDeclaration = 196,␍
>ModuleDeclaration : SyntaxKind
ModuleBlock = 196,␍
ModuleBlock = 197,␍
>ModuleBlock : SyntaxKind
ImportDeclaration = 197,␍
ImportDeclaration = 198,␍
>ImportDeclaration : SyntaxKind
ExportAssignment = 198,␍
ExportAssignment = 199,␍
>ExportAssignment : SyntaxKind
ExternalModuleReference = 199,␍
ExternalModuleReference = 200,␍
>ExternalModuleReference : SyntaxKind
CaseClause = 200,␍
CaseClause = 201,␍
>CaseClause : SyntaxKind
DefaultClause = 201,␍
DefaultClause = 202,␍
>DefaultClause : SyntaxKind
HeritageClause = 202,␍
HeritageClause = 203,␍
>HeritageClause : SyntaxKind
CatchClause = 203,␍
CatchClause = 204,␍
>CatchClause : SyntaxKind
PropertyAssignment = 204,␍
PropertyAssignment = 205,␍
>PropertyAssignment : SyntaxKind
ShorthandPropertyAssignment = 205,␍
ShorthandPropertyAssignment = 206,␍
>ShorthandPropertyAssignment : SyntaxKind
EnumMember = 206,␍
EnumMember = 207,␍
>EnumMember : SyntaxKind
SourceFile = 207,␍
SourceFile = 208,␍
>SourceFile : SyntaxKind
SyntaxList = 208,␍
SyntaxList = 209,␍
>SyntaxList : SyntaxKind
Count = 209,␍
Count = 210,␍
>Count : SyntaxKind
FirstAssignment = 52,␍
@@ -838,7 +841,7 @@ declare module "typescript" {
FirstKeyword = 65,␍
>FirstKeyword : SyntaxKind
LastKeyword = 120,␍
LastKeyword = 121,␍
>LastKeyword : SyntaxKind
FirstFutureReservedWord = 101,␍
@@ -847,10 +850,10 @@ declare module "typescript" {
LastFutureReservedWord = 109,␍
>LastFutureReservedWord : SyntaxKind
FirstTypeNode = 135,␍
FirstTypeNode = 136,␍
>FirstTypeNode : SyntaxKind
LastTypeNode = 143,␍
LastTypeNode = 144,␍
>LastTypeNode : SyntaxKind
FirstPunctuation = 14,␍
@@ -862,7 +865,7 @@ declare module "typescript" {
FirstToken = 0,␍
>FirstToken : SyntaxKind
LastToken = 120,␍
LastToken = 121,␍
>LastToken : SyntaxKind
FirstTriviaToken = 2,␍
@@ -889,7 +892,7 @@ declare module "typescript" {
LastBinaryOperator = 63,␍
>LastBinaryOperator : SyntaxKind
FirstNode = 121,␍
FirstNode = 122,␍
>FirstNode : SyntaxKind
}␍
const enum NodeFlags {␍
+105 -104
View File
@@ -210,110 +210,111 @@ declare module "typescript" {
NumberKeyword = 117,
SetKeyword = 118,
StringKeyword = 119,
TypeKeyword = 120,
QualifiedName = 121,
ComputedPropertyName = 122,
TypeParameter = 123,
Parameter = 124,
PropertySignature = 125,
PropertyDeclaration = 126,
MethodSignature = 127,
MethodDeclaration = 128,
Constructor = 129,
GetAccessor = 130,
SetAccessor = 131,
CallSignature = 132,
ConstructSignature = 133,
IndexSignature = 134,
TypeReference = 135,
FunctionType = 136,
ConstructorType = 137,
TypeQuery = 138,
TypeLiteral = 139,
ArrayType = 140,
TupleType = 141,
UnionType = 142,
ParenthesizedType = 143,
ObjectBindingPattern = 144,
ArrayBindingPattern = 145,
BindingElement = 146,
ArrayLiteralExpression = 147,
ObjectLiteralExpression = 148,
PropertyAccessExpression = 149,
ElementAccessExpression = 150,
CallExpression = 151,
NewExpression = 152,
TaggedTemplateExpression = 153,
TypeAssertionExpression = 154,
ParenthesizedExpression = 155,
FunctionExpression = 156,
ArrowFunction = 157,
DeleteExpression = 158,
TypeOfExpression = 159,
VoidExpression = 160,
PrefixUnaryExpression = 161,
PostfixUnaryExpression = 162,
BinaryExpression = 163,
ConditionalExpression = 164,
TemplateExpression = 165,
YieldExpression = 166,
SpreadElementExpression = 167,
OmittedExpression = 168,
TemplateSpan = 169,
Block = 170,
VariableStatement = 171,
EmptyStatement = 172,
ExpressionStatement = 173,
IfStatement = 174,
DoStatement = 175,
WhileStatement = 176,
ForStatement = 177,
ForInStatement = 178,
ContinueStatement = 179,
BreakStatement = 180,
ReturnStatement = 181,
WithStatement = 182,
SwitchStatement = 183,
LabeledStatement = 184,
ThrowStatement = 185,
TryStatement = 186,
DebuggerStatement = 187,
VariableDeclaration = 188,
VariableDeclarationList = 189,
FunctionDeclaration = 190,
ClassDeclaration = 191,
InterfaceDeclaration = 192,
TypeAliasDeclaration = 193,
EnumDeclaration = 194,
ModuleDeclaration = 195,
ModuleBlock = 196,
ImportDeclaration = 197,
ExportAssignment = 198,
ExternalModuleReference = 199,
CaseClause = 200,
DefaultClause = 201,
HeritageClause = 202,
CatchClause = 203,
PropertyAssignment = 204,
ShorthandPropertyAssignment = 205,
EnumMember = 206,
SourceFile = 207,
SyntaxList = 208,
Count = 209,
SymbolKeyword = 120,
TypeKeyword = 121,
QualifiedName = 122,
ComputedPropertyName = 123,
TypeParameter = 124,
Parameter = 125,
PropertySignature = 126,
PropertyDeclaration = 127,
MethodSignature = 128,
MethodDeclaration = 129,
Constructor = 130,
GetAccessor = 131,
SetAccessor = 132,
CallSignature = 133,
ConstructSignature = 134,
IndexSignature = 135,
TypeReference = 136,
FunctionType = 137,
ConstructorType = 138,
TypeQuery = 139,
TypeLiteral = 140,
ArrayType = 141,
TupleType = 142,
UnionType = 143,
ParenthesizedType = 144,
ObjectBindingPattern = 145,
ArrayBindingPattern = 146,
BindingElement = 147,
ArrayLiteralExpression = 148,
ObjectLiteralExpression = 149,
PropertyAccessExpression = 150,
ElementAccessExpression = 151,
CallExpression = 152,
NewExpression = 153,
TaggedTemplateExpression = 154,
TypeAssertionExpression = 155,
ParenthesizedExpression = 156,
FunctionExpression = 157,
ArrowFunction = 158,
DeleteExpression = 159,
TypeOfExpression = 160,
VoidExpression = 161,
PrefixUnaryExpression = 162,
PostfixUnaryExpression = 163,
BinaryExpression = 164,
ConditionalExpression = 165,
TemplateExpression = 166,
YieldExpression = 167,
SpreadElementExpression = 168,
OmittedExpression = 169,
TemplateSpan = 170,
Block = 171,
VariableStatement = 172,
EmptyStatement = 173,
ExpressionStatement = 174,
IfStatement = 175,
DoStatement = 176,
WhileStatement = 177,
ForStatement = 178,
ForInStatement = 179,
ContinueStatement = 180,
BreakStatement = 181,
ReturnStatement = 182,
WithStatement = 183,
SwitchStatement = 184,
LabeledStatement = 185,
ThrowStatement = 186,
TryStatement = 187,
DebuggerStatement = 188,
VariableDeclaration = 189,
VariableDeclarationList = 190,
FunctionDeclaration = 191,
ClassDeclaration = 192,
InterfaceDeclaration = 193,
TypeAliasDeclaration = 194,
EnumDeclaration = 195,
ModuleDeclaration = 196,
ModuleBlock = 197,
ImportDeclaration = 198,
ExportAssignment = 199,
ExternalModuleReference = 200,
CaseClause = 201,
DefaultClause = 202,
HeritageClause = 203,
CatchClause = 204,
PropertyAssignment = 205,
ShorthandPropertyAssignment = 206,
EnumMember = 207,
SourceFile = 208,
SyntaxList = 209,
Count = 210,
FirstAssignment = 52,
LastAssignment = 63,
FirstReservedWord = 65,
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 120,
LastKeyword = 121,
FirstFutureReservedWord = 101,
LastFutureReservedWord = 109,
FirstTypeNode = 135,
LastTypeNode = 143,
FirstTypeNode = 136,
LastTypeNode = 144,
FirstPunctuation = 14,
LastPunctuation = 63,
FirstToken = 0,
LastToken = 120,
LastToken = 121,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
@@ -322,7 +323,7 @@ declare module "typescript" {
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 63,
FirstNode = 121,
FirstNode = 122,
}
const enum NodeFlags {
Export = 1,
@@ -1951,24 +1952,24 @@ function delint(sourceFile) {
delintNode(sourceFile);
function delintNode(node) {
switch (node.kind) {
case 177 /* ForStatement */:
case 178 /* ForInStatement */:
case 176 /* WhileStatement */:
case 175 /* DoStatement */:
if (node.statement.kind !== 170 /* Block */) {
case 178 /* ForStatement */:
case 179 /* ForInStatement */:
case 177 /* WhileStatement */:
case 176 /* DoStatement */:
if (node.statement.kind !== 171 /* Block */) {
report(node, "A looping statement's contents should be wrapped in a block body.");
}
break;
case 174 /* IfStatement */:
case 175 /* IfStatement */:
var ifStatement = node;
if (ifStatement.thenStatement.kind !== 170 /* Block */) {
if (ifStatement.thenStatement.kind !== 171 /* Block */) {
report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body.");
}
if (ifStatement.elseStatement && ifStatement.elseStatement.kind !== 170 /* Block */ && ifStatement.elseStatement.kind !== 174 /* IfStatement */) {
if (ifStatement.elseStatement && ifStatement.elseStatement.kind !== 171 /* Block */ && ifStatement.elseStatement.kind !== 175 /* IfStatement */) {
report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body.");
}
break;
case 163 /* BinaryExpression */:
case 164 /* BinaryExpression */:
var op = node.operator;
if (op === 28 /* EqualsEqualsToken */ || op === 29 /* ExclamationEqualsToken */) {
report(node, "Use '===' and '!=='.");
@@ -697,274 +697,277 @@ declare module "typescript" {
StringKeyword = 119,␍
>StringKeyword : SyntaxKind
TypeKeyword = 120,␍
SymbolKeyword = 120,␍
>SymbolKeyword : SyntaxKind
TypeKeyword = 121,␍
>TypeKeyword : SyntaxKind
QualifiedName = 121,␍
QualifiedName = 122,␍
>QualifiedName : SyntaxKind
ComputedPropertyName = 122,␍
ComputedPropertyName = 123,␍
>ComputedPropertyName : SyntaxKind
TypeParameter = 123,␍
TypeParameter = 124,␍
>TypeParameter : SyntaxKind
Parameter = 124,␍
Parameter = 125,␍
>Parameter : SyntaxKind
PropertySignature = 125,␍
PropertySignature = 126,␍
>PropertySignature : SyntaxKind
PropertyDeclaration = 126,␍
PropertyDeclaration = 127,␍
>PropertyDeclaration : SyntaxKind
MethodSignature = 127,␍
MethodSignature = 128,␍
>MethodSignature : SyntaxKind
MethodDeclaration = 128,␍
MethodDeclaration = 129,␍
>MethodDeclaration : SyntaxKind
Constructor = 129,␍
Constructor = 130,␍
>Constructor : SyntaxKind
GetAccessor = 130,␍
GetAccessor = 131,␍
>GetAccessor : SyntaxKind
SetAccessor = 131,␍
SetAccessor = 132,␍
>SetAccessor : SyntaxKind
CallSignature = 132,␍
CallSignature = 133,␍
>CallSignature : SyntaxKind
ConstructSignature = 133,␍
ConstructSignature = 134,␍
>ConstructSignature : SyntaxKind
IndexSignature = 134,␍
IndexSignature = 135,␍
>IndexSignature : SyntaxKind
TypeReference = 135,␍
TypeReference = 136,␍
>TypeReference : SyntaxKind
FunctionType = 136,␍
FunctionType = 137,␍
>FunctionType : SyntaxKind
ConstructorType = 137,␍
ConstructorType = 138,␍
>ConstructorType : SyntaxKind
TypeQuery = 138,␍
TypeQuery = 139,␍
>TypeQuery : SyntaxKind
TypeLiteral = 139,␍
TypeLiteral = 140,␍
>TypeLiteral : SyntaxKind
ArrayType = 140,␍
ArrayType = 141,␍
>ArrayType : SyntaxKind
TupleType = 141,␍
TupleType = 142,␍
>TupleType : SyntaxKind
UnionType = 142,␍
UnionType = 143,␍
>UnionType : SyntaxKind
ParenthesizedType = 143,␍
ParenthesizedType = 144,␍
>ParenthesizedType : SyntaxKind
ObjectBindingPattern = 144,␍
ObjectBindingPattern = 145,␍
>ObjectBindingPattern : SyntaxKind
ArrayBindingPattern = 145,␍
ArrayBindingPattern = 146,␍
>ArrayBindingPattern : SyntaxKind
BindingElement = 146,␍
BindingElement = 147,␍
>BindingElement : SyntaxKind
ArrayLiteralExpression = 147,␍
ArrayLiteralExpression = 148,␍
>ArrayLiteralExpression : SyntaxKind
ObjectLiteralExpression = 148,␍
ObjectLiteralExpression = 149,␍
>ObjectLiteralExpression : SyntaxKind
PropertyAccessExpression = 149,␍
PropertyAccessExpression = 150,␍
>PropertyAccessExpression : SyntaxKind
ElementAccessExpression = 150,␍
ElementAccessExpression = 151,␍
>ElementAccessExpression : SyntaxKind
CallExpression = 151,␍
CallExpression = 152,␍
>CallExpression : SyntaxKind
NewExpression = 152,␍
NewExpression = 153,␍
>NewExpression : SyntaxKind
TaggedTemplateExpression = 153,␍
TaggedTemplateExpression = 154,␍
>TaggedTemplateExpression : SyntaxKind
TypeAssertionExpression = 154,␍
TypeAssertionExpression = 155,␍
>TypeAssertionExpression : SyntaxKind
ParenthesizedExpression = 155,␍
ParenthesizedExpression = 156,␍
>ParenthesizedExpression : SyntaxKind
FunctionExpression = 156,␍
FunctionExpression = 157,␍
>FunctionExpression : SyntaxKind
ArrowFunction = 157,␍
ArrowFunction = 158,␍
>ArrowFunction : SyntaxKind
DeleteExpression = 158,␍
DeleteExpression = 159,␍
>DeleteExpression : SyntaxKind
TypeOfExpression = 159,␍
TypeOfExpression = 160,␍
>TypeOfExpression : SyntaxKind
VoidExpression = 160,␍
VoidExpression = 161,␍
>VoidExpression : SyntaxKind
PrefixUnaryExpression = 161,␍
PrefixUnaryExpression = 162,␍
>PrefixUnaryExpression : SyntaxKind
PostfixUnaryExpression = 162,␍
PostfixUnaryExpression = 163,␍
>PostfixUnaryExpression : SyntaxKind
BinaryExpression = 163,␍
BinaryExpression = 164,␍
>BinaryExpression : SyntaxKind
ConditionalExpression = 164,␍
ConditionalExpression = 165,␍
>ConditionalExpression : SyntaxKind
TemplateExpression = 165,␍
TemplateExpression = 166,␍
>TemplateExpression : SyntaxKind
YieldExpression = 166,␍
YieldExpression = 167,␍
>YieldExpression : SyntaxKind
SpreadElementExpression = 167,␍
SpreadElementExpression = 168,␍
>SpreadElementExpression : SyntaxKind
OmittedExpression = 168,␍
OmittedExpression = 169,␍
>OmittedExpression : SyntaxKind
TemplateSpan = 169,␍
TemplateSpan = 170,␍
>TemplateSpan : SyntaxKind
Block = 170,␍
Block = 171,␍
>Block : SyntaxKind
VariableStatement = 171,␍
VariableStatement = 172,␍
>VariableStatement : SyntaxKind
EmptyStatement = 172,␍
EmptyStatement = 173,␍
>EmptyStatement : SyntaxKind
ExpressionStatement = 173,␍
ExpressionStatement = 174,␍
>ExpressionStatement : SyntaxKind
IfStatement = 174,␍
IfStatement = 175,␍
>IfStatement : SyntaxKind
DoStatement = 175,␍
DoStatement = 176,␍
>DoStatement : SyntaxKind
WhileStatement = 176,␍
WhileStatement = 177,␍
>WhileStatement : SyntaxKind
ForStatement = 177,␍
ForStatement = 178,␍
>ForStatement : SyntaxKind
ForInStatement = 178,␍
ForInStatement = 179,␍
>ForInStatement : SyntaxKind
ContinueStatement = 179,␍
ContinueStatement = 180,␍
>ContinueStatement : SyntaxKind
BreakStatement = 180,␍
BreakStatement = 181,␍
>BreakStatement : SyntaxKind
ReturnStatement = 181,␍
ReturnStatement = 182,␍
>ReturnStatement : SyntaxKind
WithStatement = 182,␍
WithStatement = 183,␍
>WithStatement : SyntaxKind
SwitchStatement = 183,␍
SwitchStatement = 184,␍
>SwitchStatement : SyntaxKind
LabeledStatement = 184,␍
LabeledStatement = 185,␍
>LabeledStatement : SyntaxKind
ThrowStatement = 185,␍
ThrowStatement = 186,␍
>ThrowStatement : SyntaxKind
TryStatement = 186,␍
TryStatement = 187,␍
>TryStatement : SyntaxKind
DebuggerStatement = 187,␍
DebuggerStatement = 188,␍
>DebuggerStatement : SyntaxKind
VariableDeclaration = 188,␍
VariableDeclaration = 189,␍
>VariableDeclaration : SyntaxKind
VariableDeclarationList = 189,␍
VariableDeclarationList = 190,␍
>VariableDeclarationList : SyntaxKind
FunctionDeclaration = 190,␍
FunctionDeclaration = 191,␍
>FunctionDeclaration : SyntaxKind
ClassDeclaration = 191,␍
ClassDeclaration = 192,␍
>ClassDeclaration : SyntaxKind
InterfaceDeclaration = 192,␍
InterfaceDeclaration = 193,␍
>InterfaceDeclaration : SyntaxKind
TypeAliasDeclaration = 193,␍
TypeAliasDeclaration = 194,␍
>TypeAliasDeclaration : SyntaxKind
EnumDeclaration = 194,␍
EnumDeclaration = 195,␍
>EnumDeclaration : SyntaxKind
ModuleDeclaration = 195,␍
ModuleDeclaration = 196,␍
>ModuleDeclaration : SyntaxKind
ModuleBlock = 196,␍
ModuleBlock = 197,␍
>ModuleBlock : SyntaxKind
ImportDeclaration = 197,␍
ImportDeclaration = 198,␍
>ImportDeclaration : SyntaxKind
ExportAssignment = 198,␍
ExportAssignment = 199,␍
>ExportAssignment : SyntaxKind
ExternalModuleReference = 199,␍
ExternalModuleReference = 200,␍
>ExternalModuleReference : SyntaxKind
CaseClause = 200,␍
CaseClause = 201,␍
>CaseClause : SyntaxKind
DefaultClause = 201,␍
DefaultClause = 202,␍
>DefaultClause : SyntaxKind
HeritageClause = 202,␍
HeritageClause = 203,␍
>HeritageClause : SyntaxKind
CatchClause = 203,␍
CatchClause = 204,␍
>CatchClause : SyntaxKind
PropertyAssignment = 204,␍
PropertyAssignment = 205,␍
>PropertyAssignment : SyntaxKind
ShorthandPropertyAssignment = 205,␍
ShorthandPropertyAssignment = 206,␍
>ShorthandPropertyAssignment : SyntaxKind
EnumMember = 206,␍
EnumMember = 207,␍
>EnumMember : SyntaxKind
SourceFile = 207,␍
SourceFile = 208,␍
>SourceFile : SyntaxKind
SyntaxList = 208,␍
SyntaxList = 209,␍
>SyntaxList : SyntaxKind
Count = 209,␍
Count = 210,␍
>Count : SyntaxKind
FirstAssignment = 52,␍
@@ -982,7 +985,7 @@ declare module "typescript" {
FirstKeyword = 65,␍
>FirstKeyword : SyntaxKind
LastKeyword = 120,␍
LastKeyword = 121,␍
>LastKeyword : SyntaxKind
FirstFutureReservedWord = 101,␍
@@ -991,10 +994,10 @@ declare module "typescript" {
LastFutureReservedWord = 109,␍
>LastFutureReservedWord : SyntaxKind
FirstTypeNode = 135,␍
FirstTypeNode = 136,␍
>FirstTypeNode : SyntaxKind
LastTypeNode = 143,␍
LastTypeNode = 144,␍
>LastTypeNode : SyntaxKind
FirstPunctuation = 14,␍
@@ -1006,7 +1009,7 @@ declare module "typescript" {
FirstToken = 0,␍
>FirstToken : SyntaxKind
LastToken = 120,␍
LastToken = 121,␍
>LastToken : SyntaxKind
FirstTriviaToken = 2,␍
@@ -1033,7 +1036,7 @@ declare module "typescript" {
LastBinaryOperator = 63,␍
>LastBinaryOperator : SyntaxKind
FirstNode = 121,␍
FirstNode = 122,␍
>FirstNode : SyntaxKind
}␍
const enum NodeFlags {␍
@@ -211,110 +211,111 @@ declare module "typescript" {
NumberKeyword = 117,
SetKeyword = 118,
StringKeyword = 119,
TypeKeyword = 120,
QualifiedName = 121,
ComputedPropertyName = 122,
TypeParameter = 123,
Parameter = 124,
PropertySignature = 125,
PropertyDeclaration = 126,
MethodSignature = 127,
MethodDeclaration = 128,
Constructor = 129,
GetAccessor = 130,
SetAccessor = 131,
CallSignature = 132,
ConstructSignature = 133,
IndexSignature = 134,
TypeReference = 135,
FunctionType = 136,
ConstructorType = 137,
TypeQuery = 138,
TypeLiteral = 139,
ArrayType = 140,
TupleType = 141,
UnionType = 142,
ParenthesizedType = 143,
ObjectBindingPattern = 144,
ArrayBindingPattern = 145,
BindingElement = 146,
ArrayLiteralExpression = 147,
ObjectLiteralExpression = 148,
PropertyAccessExpression = 149,
ElementAccessExpression = 150,
CallExpression = 151,
NewExpression = 152,
TaggedTemplateExpression = 153,
TypeAssertionExpression = 154,
ParenthesizedExpression = 155,
FunctionExpression = 156,
ArrowFunction = 157,
DeleteExpression = 158,
TypeOfExpression = 159,
VoidExpression = 160,
PrefixUnaryExpression = 161,
PostfixUnaryExpression = 162,
BinaryExpression = 163,
ConditionalExpression = 164,
TemplateExpression = 165,
YieldExpression = 166,
SpreadElementExpression = 167,
OmittedExpression = 168,
TemplateSpan = 169,
Block = 170,
VariableStatement = 171,
EmptyStatement = 172,
ExpressionStatement = 173,
IfStatement = 174,
DoStatement = 175,
WhileStatement = 176,
ForStatement = 177,
ForInStatement = 178,
ContinueStatement = 179,
BreakStatement = 180,
ReturnStatement = 181,
WithStatement = 182,
SwitchStatement = 183,
LabeledStatement = 184,
ThrowStatement = 185,
TryStatement = 186,
DebuggerStatement = 187,
VariableDeclaration = 188,
VariableDeclarationList = 189,
FunctionDeclaration = 190,
ClassDeclaration = 191,
InterfaceDeclaration = 192,
TypeAliasDeclaration = 193,
EnumDeclaration = 194,
ModuleDeclaration = 195,
ModuleBlock = 196,
ImportDeclaration = 197,
ExportAssignment = 198,
ExternalModuleReference = 199,
CaseClause = 200,
DefaultClause = 201,
HeritageClause = 202,
CatchClause = 203,
PropertyAssignment = 204,
ShorthandPropertyAssignment = 205,
EnumMember = 206,
SourceFile = 207,
SyntaxList = 208,
Count = 209,
SymbolKeyword = 120,
TypeKeyword = 121,
QualifiedName = 122,
ComputedPropertyName = 123,
TypeParameter = 124,
Parameter = 125,
PropertySignature = 126,
PropertyDeclaration = 127,
MethodSignature = 128,
MethodDeclaration = 129,
Constructor = 130,
GetAccessor = 131,
SetAccessor = 132,
CallSignature = 133,
ConstructSignature = 134,
IndexSignature = 135,
TypeReference = 136,
FunctionType = 137,
ConstructorType = 138,
TypeQuery = 139,
TypeLiteral = 140,
ArrayType = 141,
TupleType = 142,
UnionType = 143,
ParenthesizedType = 144,
ObjectBindingPattern = 145,
ArrayBindingPattern = 146,
BindingElement = 147,
ArrayLiteralExpression = 148,
ObjectLiteralExpression = 149,
PropertyAccessExpression = 150,
ElementAccessExpression = 151,
CallExpression = 152,
NewExpression = 153,
TaggedTemplateExpression = 154,
TypeAssertionExpression = 155,
ParenthesizedExpression = 156,
FunctionExpression = 157,
ArrowFunction = 158,
DeleteExpression = 159,
TypeOfExpression = 160,
VoidExpression = 161,
PrefixUnaryExpression = 162,
PostfixUnaryExpression = 163,
BinaryExpression = 164,
ConditionalExpression = 165,
TemplateExpression = 166,
YieldExpression = 167,
SpreadElementExpression = 168,
OmittedExpression = 169,
TemplateSpan = 170,
Block = 171,
VariableStatement = 172,
EmptyStatement = 173,
ExpressionStatement = 174,
IfStatement = 175,
DoStatement = 176,
WhileStatement = 177,
ForStatement = 178,
ForInStatement = 179,
ContinueStatement = 180,
BreakStatement = 181,
ReturnStatement = 182,
WithStatement = 183,
SwitchStatement = 184,
LabeledStatement = 185,
ThrowStatement = 186,
TryStatement = 187,
DebuggerStatement = 188,
VariableDeclaration = 189,
VariableDeclarationList = 190,
FunctionDeclaration = 191,
ClassDeclaration = 192,
InterfaceDeclaration = 193,
TypeAliasDeclaration = 194,
EnumDeclaration = 195,
ModuleDeclaration = 196,
ModuleBlock = 197,
ImportDeclaration = 198,
ExportAssignment = 199,
ExternalModuleReference = 200,
CaseClause = 201,
DefaultClause = 202,
HeritageClause = 203,
CatchClause = 204,
PropertyAssignment = 205,
ShorthandPropertyAssignment = 206,
EnumMember = 207,
SourceFile = 208,
SyntaxList = 209,
Count = 210,
FirstAssignment = 52,
LastAssignment = 63,
FirstReservedWord = 65,
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 120,
LastKeyword = 121,
FirstFutureReservedWord = 101,
LastFutureReservedWord = 109,
FirstTypeNode = 135,
LastTypeNode = 143,
FirstTypeNode = 136,
LastTypeNode = 144,
FirstPunctuation = 14,
LastPunctuation = 63,
FirstToken = 0,
LastToken = 120,
LastToken = 121,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
@@ -323,7 +324,7 @@ declare module "typescript" {
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 63,
FirstNode = 121,
FirstNode = 122,
}
const enum NodeFlags {
Export = 1,
@@ -649,274 +649,277 @@ declare module "typescript" {
StringKeyword = 119,
>StringKeyword : SyntaxKind
TypeKeyword = 120,
SymbolKeyword = 120,
>SymbolKeyword : SyntaxKind
TypeKeyword = 121,
>TypeKeyword : SyntaxKind
QualifiedName = 121,
QualifiedName = 122,
>QualifiedName : SyntaxKind
ComputedPropertyName = 122,
ComputedPropertyName = 123,
>ComputedPropertyName : SyntaxKind
TypeParameter = 123,
TypeParameter = 124,
>TypeParameter : SyntaxKind
Parameter = 124,
Parameter = 125,
>Parameter : SyntaxKind
PropertySignature = 125,
PropertySignature = 126,
>PropertySignature : SyntaxKind
PropertyDeclaration = 126,
PropertyDeclaration = 127,
>PropertyDeclaration : SyntaxKind
MethodSignature = 127,
MethodSignature = 128,
>MethodSignature : SyntaxKind
MethodDeclaration = 128,
MethodDeclaration = 129,
>MethodDeclaration : SyntaxKind
Constructor = 129,
Constructor = 130,
>Constructor : SyntaxKind
GetAccessor = 130,
GetAccessor = 131,
>GetAccessor : SyntaxKind
SetAccessor = 131,
SetAccessor = 132,
>SetAccessor : SyntaxKind
CallSignature = 132,
CallSignature = 133,
>CallSignature : SyntaxKind
ConstructSignature = 133,
ConstructSignature = 134,
>ConstructSignature : SyntaxKind
IndexSignature = 134,
IndexSignature = 135,
>IndexSignature : SyntaxKind
TypeReference = 135,
TypeReference = 136,
>TypeReference : SyntaxKind
FunctionType = 136,
FunctionType = 137,
>FunctionType : SyntaxKind
ConstructorType = 137,
ConstructorType = 138,
>ConstructorType : SyntaxKind
TypeQuery = 138,
TypeQuery = 139,
>TypeQuery : SyntaxKind
TypeLiteral = 139,
TypeLiteral = 140,
>TypeLiteral : SyntaxKind
ArrayType = 140,
ArrayType = 141,
>ArrayType : SyntaxKind
TupleType = 141,
TupleType = 142,
>TupleType : SyntaxKind
UnionType = 142,
UnionType = 143,
>UnionType : SyntaxKind
ParenthesizedType = 143,
ParenthesizedType = 144,
>ParenthesizedType : SyntaxKind
ObjectBindingPattern = 144,
ObjectBindingPattern = 145,
>ObjectBindingPattern : SyntaxKind
ArrayBindingPattern = 145,
ArrayBindingPattern = 146,
>ArrayBindingPattern : SyntaxKind
BindingElement = 146,
BindingElement = 147,
>BindingElement : SyntaxKind
ArrayLiteralExpression = 147,
ArrayLiteralExpression = 148,
>ArrayLiteralExpression : SyntaxKind
ObjectLiteralExpression = 148,
ObjectLiteralExpression = 149,
>ObjectLiteralExpression : SyntaxKind
PropertyAccessExpression = 149,
PropertyAccessExpression = 150,
>PropertyAccessExpression : SyntaxKind
ElementAccessExpression = 150,
ElementAccessExpression = 151,
>ElementAccessExpression : SyntaxKind
CallExpression = 151,
CallExpression = 152,
>CallExpression : SyntaxKind
NewExpression = 152,
NewExpression = 153,
>NewExpression : SyntaxKind
TaggedTemplateExpression = 153,
TaggedTemplateExpression = 154,
>TaggedTemplateExpression : SyntaxKind
TypeAssertionExpression = 154,
TypeAssertionExpression = 155,
>TypeAssertionExpression : SyntaxKind
ParenthesizedExpression = 155,
ParenthesizedExpression = 156,
>ParenthesizedExpression : SyntaxKind
FunctionExpression = 156,
FunctionExpression = 157,
>FunctionExpression : SyntaxKind
ArrowFunction = 157,
ArrowFunction = 158,
>ArrowFunction : SyntaxKind
DeleteExpression = 158,
DeleteExpression = 159,
>DeleteExpression : SyntaxKind
TypeOfExpression = 159,
TypeOfExpression = 160,
>TypeOfExpression : SyntaxKind
VoidExpression = 160,
VoidExpression = 161,
>VoidExpression : SyntaxKind
PrefixUnaryExpression = 161,
PrefixUnaryExpression = 162,
>PrefixUnaryExpression : SyntaxKind
PostfixUnaryExpression = 162,
PostfixUnaryExpression = 163,
>PostfixUnaryExpression : SyntaxKind
BinaryExpression = 163,
BinaryExpression = 164,
>BinaryExpression : SyntaxKind
ConditionalExpression = 164,
ConditionalExpression = 165,
>ConditionalExpression : SyntaxKind
TemplateExpression = 165,
TemplateExpression = 166,
>TemplateExpression : SyntaxKind
YieldExpression = 166,
YieldExpression = 167,
>YieldExpression : SyntaxKind
SpreadElementExpression = 167,
SpreadElementExpression = 168,
>SpreadElementExpression : SyntaxKind
OmittedExpression = 168,
OmittedExpression = 169,
>OmittedExpression : SyntaxKind
TemplateSpan = 169,
TemplateSpan = 170,
>TemplateSpan : SyntaxKind
Block = 170,
Block = 171,
>Block : SyntaxKind
VariableStatement = 171,
VariableStatement = 172,
>VariableStatement : SyntaxKind
EmptyStatement = 172,
EmptyStatement = 173,
>EmptyStatement : SyntaxKind
ExpressionStatement = 173,
ExpressionStatement = 174,
>ExpressionStatement : SyntaxKind
IfStatement = 174,
IfStatement = 175,
>IfStatement : SyntaxKind
DoStatement = 175,
DoStatement = 176,
>DoStatement : SyntaxKind
WhileStatement = 176,
WhileStatement = 177,
>WhileStatement : SyntaxKind
ForStatement = 177,
ForStatement = 178,
>ForStatement : SyntaxKind
ForInStatement = 178,
ForInStatement = 179,
>ForInStatement : SyntaxKind
ContinueStatement = 179,
ContinueStatement = 180,
>ContinueStatement : SyntaxKind
BreakStatement = 180,
BreakStatement = 181,
>BreakStatement : SyntaxKind
ReturnStatement = 181,
ReturnStatement = 182,
>ReturnStatement : SyntaxKind
WithStatement = 182,
WithStatement = 183,
>WithStatement : SyntaxKind
SwitchStatement = 183,
SwitchStatement = 184,
>SwitchStatement : SyntaxKind
LabeledStatement = 184,
LabeledStatement = 185,
>LabeledStatement : SyntaxKind
ThrowStatement = 185,
ThrowStatement = 186,
>ThrowStatement : SyntaxKind
TryStatement = 186,
TryStatement = 187,
>TryStatement : SyntaxKind
DebuggerStatement = 187,
DebuggerStatement = 188,
>DebuggerStatement : SyntaxKind
VariableDeclaration = 188,
VariableDeclaration = 189,
>VariableDeclaration : SyntaxKind
VariableDeclarationList = 189,
VariableDeclarationList = 190,
>VariableDeclarationList : SyntaxKind
FunctionDeclaration = 190,
FunctionDeclaration = 191,
>FunctionDeclaration : SyntaxKind
ClassDeclaration = 191,
ClassDeclaration = 192,
>ClassDeclaration : SyntaxKind
InterfaceDeclaration = 192,
InterfaceDeclaration = 193,
>InterfaceDeclaration : SyntaxKind
TypeAliasDeclaration = 193,
TypeAliasDeclaration = 194,
>TypeAliasDeclaration : SyntaxKind
EnumDeclaration = 194,
EnumDeclaration = 195,
>EnumDeclaration : SyntaxKind
ModuleDeclaration = 195,
ModuleDeclaration = 196,
>ModuleDeclaration : SyntaxKind
ModuleBlock = 196,
ModuleBlock = 197,
>ModuleBlock : SyntaxKind
ImportDeclaration = 197,
ImportDeclaration = 198,
>ImportDeclaration : SyntaxKind
ExportAssignment = 198,
ExportAssignment = 199,
>ExportAssignment : SyntaxKind
ExternalModuleReference = 199,
ExternalModuleReference = 200,
>ExternalModuleReference : SyntaxKind
CaseClause = 200,
CaseClause = 201,
>CaseClause : SyntaxKind
DefaultClause = 201,
DefaultClause = 202,
>DefaultClause : SyntaxKind
HeritageClause = 202,
HeritageClause = 203,
>HeritageClause : SyntaxKind
CatchClause = 203,
CatchClause = 204,
>CatchClause : SyntaxKind
PropertyAssignment = 204,
PropertyAssignment = 205,
>PropertyAssignment : SyntaxKind
ShorthandPropertyAssignment = 205,
ShorthandPropertyAssignment = 206,
>ShorthandPropertyAssignment : SyntaxKind
EnumMember = 206,
EnumMember = 207,
>EnumMember : SyntaxKind
SourceFile = 207,
SourceFile = 208,
>SourceFile : SyntaxKind
SyntaxList = 208,
SyntaxList = 209,
>SyntaxList : SyntaxKind
Count = 209,
Count = 210,
>Count : SyntaxKind
FirstAssignment = 52,
@@ -934,7 +937,7 @@ declare module "typescript" {
FirstKeyword = 65,
>FirstKeyword : SyntaxKind
LastKeyword = 120,
LastKeyword = 121,
>LastKeyword : SyntaxKind
FirstFutureReservedWord = 101,
@@ -943,10 +946,10 @@ declare module "typescript" {
LastFutureReservedWord = 109,
>LastFutureReservedWord : SyntaxKind
FirstTypeNode = 135,
FirstTypeNode = 136,
>FirstTypeNode : SyntaxKind
LastTypeNode = 143,
LastTypeNode = 144,
>LastTypeNode : SyntaxKind
FirstPunctuation = 14,
@@ -958,7 +961,7 @@ declare module "typescript" {
FirstToken = 0,
>FirstToken : SyntaxKind
LastToken = 120,
LastToken = 121,
>LastToken : SyntaxKind
FirstTriviaToken = 2,
@@ -985,7 +988,7 @@ declare module "typescript" {
LastBinaryOperator = 63,
>LastBinaryOperator : SyntaxKind
FirstNode = 121,
FirstNode = 122,
>FirstNode : SyntaxKind
}
const enum NodeFlags {
+96 -95
View File
@@ -248,110 +248,111 @@ declare module "typescript" {
NumberKeyword = 117,
SetKeyword = 118,
StringKeyword = 119,
TypeKeyword = 120,
QualifiedName = 121,
ComputedPropertyName = 122,
TypeParameter = 123,
Parameter = 124,
PropertySignature = 125,
PropertyDeclaration = 126,
MethodSignature = 127,
MethodDeclaration = 128,
Constructor = 129,
GetAccessor = 130,
SetAccessor = 131,
CallSignature = 132,
ConstructSignature = 133,
IndexSignature = 134,
TypeReference = 135,
FunctionType = 136,
ConstructorType = 137,
TypeQuery = 138,
TypeLiteral = 139,
ArrayType = 140,
TupleType = 141,
UnionType = 142,
ParenthesizedType = 143,
ObjectBindingPattern = 144,
ArrayBindingPattern = 145,
BindingElement = 146,
ArrayLiteralExpression = 147,
ObjectLiteralExpression = 148,
PropertyAccessExpression = 149,
ElementAccessExpression = 150,
CallExpression = 151,
NewExpression = 152,
TaggedTemplateExpression = 153,
TypeAssertionExpression = 154,
ParenthesizedExpression = 155,
FunctionExpression = 156,
ArrowFunction = 157,
DeleteExpression = 158,
TypeOfExpression = 159,
VoidExpression = 160,
PrefixUnaryExpression = 161,
PostfixUnaryExpression = 162,
BinaryExpression = 163,
ConditionalExpression = 164,
TemplateExpression = 165,
YieldExpression = 166,
SpreadElementExpression = 167,
OmittedExpression = 168,
TemplateSpan = 169,
Block = 170,
VariableStatement = 171,
EmptyStatement = 172,
ExpressionStatement = 173,
IfStatement = 174,
DoStatement = 175,
WhileStatement = 176,
ForStatement = 177,
ForInStatement = 178,
ContinueStatement = 179,
BreakStatement = 180,
ReturnStatement = 181,
WithStatement = 182,
SwitchStatement = 183,
LabeledStatement = 184,
ThrowStatement = 185,
TryStatement = 186,
DebuggerStatement = 187,
VariableDeclaration = 188,
VariableDeclarationList = 189,
FunctionDeclaration = 190,
ClassDeclaration = 191,
InterfaceDeclaration = 192,
TypeAliasDeclaration = 193,
EnumDeclaration = 194,
ModuleDeclaration = 195,
ModuleBlock = 196,
ImportDeclaration = 197,
ExportAssignment = 198,
ExternalModuleReference = 199,
CaseClause = 200,
DefaultClause = 201,
HeritageClause = 202,
CatchClause = 203,
PropertyAssignment = 204,
ShorthandPropertyAssignment = 205,
EnumMember = 206,
SourceFile = 207,
SyntaxList = 208,
Count = 209,
SymbolKeyword = 120,
TypeKeyword = 121,
QualifiedName = 122,
ComputedPropertyName = 123,
TypeParameter = 124,
Parameter = 125,
PropertySignature = 126,
PropertyDeclaration = 127,
MethodSignature = 128,
MethodDeclaration = 129,
Constructor = 130,
GetAccessor = 131,
SetAccessor = 132,
CallSignature = 133,
ConstructSignature = 134,
IndexSignature = 135,
TypeReference = 136,
FunctionType = 137,
ConstructorType = 138,
TypeQuery = 139,
TypeLiteral = 140,
ArrayType = 141,
TupleType = 142,
UnionType = 143,
ParenthesizedType = 144,
ObjectBindingPattern = 145,
ArrayBindingPattern = 146,
BindingElement = 147,
ArrayLiteralExpression = 148,
ObjectLiteralExpression = 149,
PropertyAccessExpression = 150,
ElementAccessExpression = 151,
CallExpression = 152,
NewExpression = 153,
TaggedTemplateExpression = 154,
TypeAssertionExpression = 155,
ParenthesizedExpression = 156,
FunctionExpression = 157,
ArrowFunction = 158,
DeleteExpression = 159,
TypeOfExpression = 160,
VoidExpression = 161,
PrefixUnaryExpression = 162,
PostfixUnaryExpression = 163,
BinaryExpression = 164,
ConditionalExpression = 165,
TemplateExpression = 166,
YieldExpression = 167,
SpreadElementExpression = 168,
OmittedExpression = 169,
TemplateSpan = 170,
Block = 171,
VariableStatement = 172,
EmptyStatement = 173,
ExpressionStatement = 174,
IfStatement = 175,
DoStatement = 176,
WhileStatement = 177,
ForStatement = 178,
ForInStatement = 179,
ContinueStatement = 180,
BreakStatement = 181,
ReturnStatement = 182,
WithStatement = 183,
SwitchStatement = 184,
LabeledStatement = 185,
ThrowStatement = 186,
TryStatement = 187,
DebuggerStatement = 188,
VariableDeclaration = 189,
VariableDeclarationList = 190,
FunctionDeclaration = 191,
ClassDeclaration = 192,
InterfaceDeclaration = 193,
TypeAliasDeclaration = 194,
EnumDeclaration = 195,
ModuleDeclaration = 196,
ModuleBlock = 197,
ImportDeclaration = 198,
ExportAssignment = 199,
ExternalModuleReference = 200,
CaseClause = 201,
DefaultClause = 202,
HeritageClause = 203,
CatchClause = 204,
PropertyAssignment = 205,
ShorthandPropertyAssignment = 206,
EnumMember = 207,
SourceFile = 208,
SyntaxList = 209,
Count = 210,
FirstAssignment = 52,
LastAssignment = 63,
FirstReservedWord = 65,
LastReservedWord = 100,
FirstKeyword = 65,
LastKeyword = 120,
LastKeyword = 121,
FirstFutureReservedWord = 101,
LastFutureReservedWord = 109,
FirstTypeNode = 135,
LastTypeNode = 143,
FirstTypeNode = 136,
LastTypeNode = 144,
FirstPunctuation = 14,
LastPunctuation = 63,
FirstToken = 0,
LastToken = 120,
LastToken = 121,
FirstTriviaToken = 2,
LastTriviaToken = 6,
FirstLiteralToken = 7,
@@ -360,7 +361,7 @@ declare module "typescript" {
LastTemplateToken = 13,
FirstBinaryOperator = 24,
LastBinaryOperator = 63,
FirstNode = 121,
FirstNode = 122,
}
const enum NodeFlags {
Export = 1,
@@ -822,274 +822,277 @@ declare module "typescript" {
StringKeyword = 119,
>StringKeyword : SyntaxKind
TypeKeyword = 120,
SymbolKeyword = 120,
>SymbolKeyword : SyntaxKind
TypeKeyword = 121,
>TypeKeyword : SyntaxKind
QualifiedName = 121,
QualifiedName = 122,
>QualifiedName : SyntaxKind
ComputedPropertyName = 122,
ComputedPropertyName = 123,
>ComputedPropertyName : SyntaxKind
TypeParameter = 123,
TypeParameter = 124,
>TypeParameter : SyntaxKind
Parameter = 124,
Parameter = 125,
>Parameter : SyntaxKind
PropertySignature = 125,
PropertySignature = 126,
>PropertySignature : SyntaxKind
PropertyDeclaration = 126,
PropertyDeclaration = 127,
>PropertyDeclaration : SyntaxKind
MethodSignature = 127,
MethodSignature = 128,
>MethodSignature : SyntaxKind
MethodDeclaration = 128,
MethodDeclaration = 129,
>MethodDeclaration : SyntaxKind
Constructor = 129,
Constructor = 130,
>Constructor : SyntaxKind
GetAccessor = 130,
GetAccessor = 131,
>GetAccessor : SyntaxKind
SetAccessor = 131,
SetAccessor = 132,
>SetAccessor : SyntaxKind
CallSignature = 132,
CallSignature = 133,
>CallSignature : SyntaxKind
ConstructSignature = 133,
ConstructSignature = 134,
>ConstructSignature : SyntaxKind
IndexSignature = 134,
IndexSignature = 135,
>IndexSignature : SyntaxKind
TypeReference = 135,
TypeReference = 136,
>TypeReference : SyntaxKind
FunctionType = 136,
FunctionType = 137,
>FunctionType : SyntaxKind
ConstructorType = 137,
ConstructorType = 138,
>ConstructorType : SyntaxKind
TypeQuery = 138,
TypeQuery = 139,
>TypeQuery : SyntaxKind
TypeLiteral = 139,
TypeLiteral = 140,
>TypeLiteral : SyntaxKind
ArrayType = 140,
ArrayType = 141,
>ArrayType : SyntaxKind
TupleType = 141,
TupleType = 142,
>TupleType : SyntaxKind
UnionType = 142,
UnionType = 143,
>UnionType : SyntaxKind
ParenthesizedType = 143,
ParenthesizedType = 144,
>ParenthesizedType : SyntaxKind
ObjectBindingPattern = 144,
ObjectBindingPattern = 145,
>ObjectBindingPattern : SyntaxKind
ArrayBindingPattern = 145,
ArrayBindingPattern = 146,
>ArrayBindingPattern : SyntaxKind
BindingElement = 146,
BindingElement = 147,
>BindingElement : SyntaxKind
ArrayLiteralExpression = 147,
ArrayLiteralExpression = 148,
>ArrayLiteralExpression : SyntaxKind
ObjectLiteralExpression = 148,
ObjectLiteralExpression = 149,
>ObjectLiteralExpression : SyntaxKind
PropertyAccessExpression = 149,
PropertyAccessExpression = 150,
>PropertyAccessExpression : SyntaxKind
ElementAccessExpression = 150,
ElementAccessExpression = 151,
>ElementAccessExpression : SyntaxKind
CallExpression = 151,
CallExpression = 152,
>CallExpression : SyntaxKind
NewExpression = 152,
NewExpression = 153,
>NewExpression : SyntaxKind
TaggedTemplateExpression = 153,
TaggedTemplateExpression = 154,
>TaggedTemplateExpression : SyntaxKind
TypeAssertionExpression = 154,
TypeAssertionExpression = 155,
>TypeAssertionExpression : SyntaxKind
ParenthesizedExpression = 155,
ParenthesizedExpression = 156,
>ParenthesizedExpression : SyntaxKind
FunctionExpression = 156,
FunctionExpression = 157,
>FunctionExpression : SyntaxKind
ArrowFunction = 157,
ArrowFunction = 158,
>ArrowFunction : SyntaxKind
DeleteExpression = 158,
DeleteExpression = 159,
>DeleteExpression : SyntaxKind
TypeOfExpression = 159,
TypeOfExpression = 160,
>TypeOfExpression : SyntaxKind
VoidExpression = 160,
VoidExpression = 161,
>VoidExpression : SyntaxKind
PrefixUnaryExpression = 161,
PrefixUnaryExpression = 162,
>PrefixUnaryExpression : SyntaxKind
PostfixUnaryExpression = 162,
PostfixUnaryExpression = 163,
>PostfixUnaryExpression : SyntaxKind
BinaryExpression = 163,
BinaryExpression = 164,
>BinaryExpression : SyntaxKind
ConditionalExpression = 164,
ConditionalExpression = 165,
>ConditionalExpression : SyntaxKind
TemplateExpression = 165,
TemplateExpression = 166,
>TemplateExpression : SyntaxKind
YieldExpression = 166,
YieldExpression = 167,
>YieldExpression : SyntaxKind
SpreadElementExpression = 167,
SpreadElementExpression = 168,
>SpreadElementExpression : SyntaxKind
OmittedExpression = 168,
OmittedExpression = 169,
>OmittedExpression : SyntaxKind
TemplateSpan = 169,
TemplateSpan = 170,
>TemplateSpan : SyntaxKind
Block = 170,
Block = 171,
>Block : SyntaxKind
VariableStatement = 171,
VariableStatement = 172,
>VariableStatement : SyntaxKind
EmptyStatement = 172,
EmptyStatement = 173,
>EmptyStatement : SyntaxKind
ExpressionStatement = 173,
ExpressionStatement = 174,
>ExpressionStatement : SyntaxKind
IfStatement = 174,
IfStatement = 175,
>IfStatement : SyntaxKind
DoStatement = 175,
DoStatement = 176,
>DoStatement : SyntaxKind
WhileStatement = 176,
WhileStatement = 177,
>WhileStatement : SyntaxKind
ForStatement = 177,
ForStatement = 178,
>ForStatement : SyntaxKind
ForInStatement = 178,
ForInStatement = 179,
>ForInStatement : SyntaxKind
ContinueStatement = 179,
ContinueStatement = 180,
>ContinueStatement : SyntaxKind
BreakStatement = 180,
BreakStatement = 181,
>BreakStatement : SyntaxKind
ReturnStatement = 181,
ReturnStatement = 182,
>ReturnStatement : SyntaxKind
WithStatement = 182,
WithStatement = 183,
>WithStatement : SyntaxKind
SwitchStatement = 183,
SwitchStatement = 184,
>SwitchStatement : SyntaxKind
LabeledStatement = 184,
LabeledStatement = 185,
>LabeledStatement : SyntaxKind
ThrowStatement = 185,
ThrowStatement = 186,
>ThrowStatement : SyntaxKind
TryStatement = 186,
TryStatement = 187,
>TryStatement : SyntaxKind
DebuggerStatement = 187,
DebuggerStatement = 188,
>DebuggerStatement : SyntaxKind
VariableDeclaration = 188,
VariableDeclaration = 189,
>VariableDeclaration : SyntaxKind
VariableDeclarationList = 189,
VariableDeclarationList = 190,
>VariableDeclarationList : SyntaxKind
FunctionDeclaration = 190,
FunctionDeclaration = 191,
>FunctionDeclaration : SyntaxKind
ClassDeclaration = 191,
ClassDeclaration = 192,
>ClassDeclaration : SyntaxKind
InterfaceDeclaration = 192,
InterfaceDeclaration = 193,
>InterfaceDeclaration : SyntaxKind
TypeAliasDeclaration = 193,
TypeAliasDeclaration = 194,
>TypeAliasDeclaration : SyntaxKind
EnumDeclaration = 194,
EnumDeclaration = 195,
>EnumDeclaration : SyntaxKind
ModuleDeclaration = 195,
ModuleDeclaration = 196,
>ModuleDeclaration : SyntaxKind
ModuleBlock = 196,
ModuleBlock = 197,
>ModuleBlock : SyntaxKind
ImportDeclaration = 197,
ImportDeclaration = 198,
>ImportDeclaration : SyntaxKind
ExportAssignment = 198,
ExportAssignment = 199,
>ExportAssignment : SyntaxKind
ExternalModuleReference = 199,
ExternalModuleReference = 200,
>ExternalModuleReference : SyntaxKind
CaseClause = 200,
CaseClause = 201,
>CaseClause : SyntaxKind
DefaultClause = 201,
DefaultClause = 202,
>DefaultClause : SyntaxKind
HeritageClause = 202,
HeritageClause = 203,
>HeritageClause : SyntaxKind
CatchClause = 203,
CatchClause = 204,
>CatchClause : SyntaxKind
PropertyAssignment = 204,
PropertyAssignment = 205,
>PropertyAssignment : SyntaxKind
ShorthandPropertyAssignment = 205,
ShorthandPropertyAssignment = 206,
>ShorthandPropertyAssignment : SyntaxKind
EnumMember = 206,
EnumMember = 207,
>EnumMember : SyntaxKind
SourceFile = 207,
SourceFile = 208,
>SourceFile : SyntaxKind
SyntaxList = 208,
SyntaxList = 209,
>SyntaxList : SyntaxKind
Count = 209,
Count = 210,
>Count : SyntaxKind
FirstAssignment = 52,
@@ -1107,7 +1110,7 @@ declare module "typescript" {
FirstKeyword = 65,
>FirstKeyword : SyntaxKind
LastKeyword = 120,
LastKeyword = 121,
>LastKeyword : SyntaxKind
FirstFutureReservedWord = 101,
@@ -1116,10 +1119,10 @@ declare module "typescript" {
LastFutureReservedWord = 109,
>LastFutureReservedWord : SyntaxKind
FirstTypeNode = 135,
FirstTypeNode = 136,
>FirstTypeNode : SyntaxKind
LastTypeNode = 143,
LastTypeNode = 144,
>LastTypeNode : SyntaxKind
FirstPunctuation = 14,
@@ -1131,7 +1134,7 @@ declare module "typescript" {
FirstToken = 0,
>FirstToken : SyntaxKind
LastToken = 120,
LastToken = 121,
>LastToken : SyntaxKind
FirstTriviaToken = 2,
@@ -1158,7 +1161,7 @@ declare module "typescript" {
LastBinaryOperator = 63,
>LastBinaryOperator : SyntaxKind
FirstNode = 121,
FirstNode = 122,
>FirstNode : SyntaxKind
}
const enum NodeFlags {
@@ -1,12 +1,9 @@
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer1.ts(2,9): error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer1.ts(2,9): error TS2304: Cannot find name 'Symbol'.
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer1.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer1.ts (1 errors) ====
interface I {
[s: Symbol]: string;
[s: symbol]: string;
~~~~~~
!!! error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
}
@@ -0,0 +1,6 @@
//// [parserES5SymbolIndexer1.ts]
interface I {
[s: symbol]: string;
}
//// [parserES5SymbolIndexer1.js]
@@ -1,12 +1,9 @@
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer2.ts(2,9): error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer2.ts(2,9): error TS2304: Cannot find name 'Symbol'.
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer2.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer2.ts (1 errors) ====
class C {
[s: Symbol]: string;
[s: symbol]: string;
~~~~~~
!!! error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
}
@@ -0,0 +1,11 @@
//// [parserES5SymbolIndexer2.ts]
class C {
[s: symbol]: string;
}
//// [parserES5SymbolIndexer2.js]
var C = (function () {
function C() {
}
return C;
})();
@@ -1,12 +1,9 @@
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer3.ts(2,9): error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer3.ts(2,9): error TS2304: Cannot find name 'Symbol'.
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer3.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer3.ts (1 errors) ====
var x: {
[s: Symbol]: string;
[s: symbol]: string;
~~~~~~
!!! error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
~~~~~~
!!! error TS2304: Cannot find name 'Symbol'.
}
@@ -0,0 +1,7 @@
//// [parserES5SymbolIndexer3.ts]
var x: {
[s: symbol]: string;
}
//// [parserES5SymbolIndexer3.js]
var x;
@@ -0,0 +1,6 @@
//// [parserES5SymbolProperty1.ts]
interface I {
[Symbol.iterator]: string;
}
//// [parserES5SymbolProperty1.js]
@@ -0,0 +1,6 @@
//// [parserES5SymbolProperty2.ts]
interface I {
[Symbol.unscopables](): string;
}
//// [parserES5SymbolProperty2.js]
@@ -0,0 +1,6 @@
//// [parserES5SymbolProperty3.ts]
declare class C {
[Symbol.unscopables](): string;
}
//// [parserES5SymbolProperty3.js]
@@ -0,0 +1,6 @@
//// [parserES5SymbolProperty4.ts]
declare class C {
[Symbol.isRegExp]: string;
}
//// [parserES5SymbolProperty4.js]
@@ -0,0 +1,11 @@
//// [parserES5SymbolProperty5.ts]
class C {
[Symbol.isRegExp]: string;
}
//// [parserES5SymbolProperty5.js]
var C = (function () {
function C() {
}
return C;
})();
@@ -0,0 +1,12 @@
//// [parserES5SymbolProperty6.ts]
class C {
[Symbol.toStringTag]: string = "";
}
//// [parserES5SymbolProperty6.js]
var C = (function () {
function C() {
this[Symbol.toStringTag] = "";
}
return C;
})();
@@ -0,0 +1,13 @@
//// [parserES5SymbolProperty7.ts]
class C {
[Symbol.toStringTag](): void { }
}
//// [parserES5SymbolProperty7.js]
var C = (function () {
function C() {
}
C.prototype[Symbol.toStringTag] = function () {
};
return C;
})();
@@ -0,0 +1,7 @@
//// [parserES5SymbolProperty8.ts]
var x: {
[Symbol.toPrimitive](): string
}
//// [parserES5SymbolProperty8.js]
var x;
@@ -0,0 +1,7 @@
//// [parserES5SymbolProperty9.ts]
var x: {
[Symbol.toPrimitive]: string
}
//// [parserES5SymbolProperty9.js]
var x;
@@ -1,6 +1,6 @@
//// [parserSymbolIndexer1.ts]
interface I {
[s: Symbol]: string;
[s: symbol]: string;
}
//// [parserSymbolIndexer1.js]
@@ -1,6 +1,6 @@
//// [parserSymbolIndexer2.ts]
class C {
[s: Symbol]: string;
[s: symbol]: string;
}
//// [parserSymbolIndexer2.js]
@@ -3,7 +3,7 @@ tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer3.ts(2,5):
==== tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer3.ts (1 errors) ====
class C {
static [s: Symbol]: string;
static [s: symbol]: string;
~~~~~~
!!! error TS1145: Modifiers not permitted on index signature members.
}
@@ -0,0 +1,11 @@
//// [parserSymbolIndexer3.ts]
class C {
static [s: symbol]: string;
}
//// [parserSymbolIndexer3.js]
var C = (function () {
function C() {
}
return C;
})();
@@ -1,6 +1,6 @@
//// [parserSymbolIndexer4.ts]
var x: {
[s: Symbol]: string;
[s: symbol]: string;
}
//// [parserSymbolIndexer4.js]
@@ -1,17 +1,20 @@
tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,6): error TS2304: Cannot find name 's'.
tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,7): error TS1005: ']' expected.
tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,9): error TS2304: Cannot find name 'symbol'.
tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,15): error TS1005: ',' expected.
tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,16): error TS1136: Property assignment expected.
tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(3,1): error TS1005: ':' expected.
==== tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts (5 errors) ====
==== tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts (6 errors) ====
var x = {
[s: Symbol]: ""
[s: symbol]: ""
~
!!! error TS2304: Cannot find name 's'.
~
!!! error TS1005: ']' expected.
~~~~~~
!!! error TS2304: Cannot find name 'symbol'.
~
!!! error TS1005: ',' expected.
~
@@ -0,0 +1,10 @@
//// [parserSymbolIndexer5.ts]
var x = {
[s: symbol]: ""
}
//// [parserSymbolIndexer5.js]
var x = {
[s]: symbol,
"":
};
+1 -1
View File
@@ -1,5 +1,5 @@
//// [symbolProperty1.ts]
var s: Symbol;
var s: symbol;
var x = {
[s]: 0,
[s]() { },
@@ -1,7 +1,7 @@
//// [symbolProperty17.ts]
interface I {
[Symbol.iterator]: number;
[s: Symbol]: string;
[s: symbol]: string;
"__@iterator": string;
}
@@ -3,7 +3,7 @@ class C1 {
[Symbol.toStringTag]() {
return { x: "" };
}
[s: Symbol]: () => { x: string };
[s: symbol]: () => { x: string };
}
//// [symbolProperty29.js]
@@ -3,7 +3,7 @@ class C1 {
[Symbol.toStringTag]() {
return { x: "" };
}
[s: Symbol]: () => { x: number };
[s: symbol]: () => { x: number };
}
//// [symbolProperty30.js]
@@ -5,7 +5,7 @@ class C1 {
}
}
class C2 extends C1 {
[s: Symbol]: () => { x: string };
[s: symbol]: () => { x: string };
}
//// [symbolProperty31.js]
@@ -5,7 +5,7 @@ class C1 {
}
}
class C2 extends C1 {
[s: Symbol]: () => { x: number };
[s: symbol]: () => { x: number };
}
//// [symbolProperty32.js]
@@ -5,7 +5,7 @@ class C1 extends C2 {
}
}
class C2 {
[s: Symbol]: () => { x: string };
[s: symbol]: () => { x: string };
}
//// [symbolProperty33.js]
@@ -5,7 +5,7 @@ class C1 extends C2 {
}
}
class C2 {
[s: Symbol]: () => { x: number };
[s: symbol]: () => { x: number };
}
//// [symbolProperty34.js]
@@ -0,0 +1,26 @@
//// [symbolProperty7.ts]
class C {
[Symbol()] = 0;
[Symbol()]: number;
[Symbol()]() { }
get [Symbol()]() {
return 0;
}
}
//// [symbolProperty7.js]
var C = (function () {
function C() {
this[Symbol()] = 0;
}
C.prototype[Symbol()] = function () {
};
Object.defineProperty(C.prototype, Symbol(), {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
return C;
})();
@@ -1,5 +1,5 @@
//@target: ES6
var s: Symbol;
var s: symbol;
var x = {
[s]: 0,
[s]() { },
@@ -1,7 +1,7 @@
//@target: ES6
interface I {
[Symbol.iterator]: number;
[s: Symbol]: string;
[s: symbol]: string;
"__@iterator": string;
}
@@ -3,5 +3,5 @@ class C1 {
[Symbol.toStringTag]() {
return { x: "" };
}
[s: Symbol]: () => { x: string };
[s: symbol]: () => { x: string };
}
@@ -3,5 +3,5 @@ class C1 {
[Symbol.toStringTag]() {
return { x: "" };
}
[s: Symbol]: () => { x: number };
[s: symbol]: () => { x: number };
}
@@ -5,5 +5,5 @@ class C1 {
}
}
class C2 extends C1 {
[s: Symbol]: () => { x: string };
[s: symbol]: () => { x: string };
}
@@ -5,5 +5,5 @@ class C1 {
}
}
class C2 extends C1 {
[s: Symbol]: () => { x: number };
[s: symbol]: () => { x: number };
}
@@ -5,5 +5,5 @@ class C1 extends C2 {
}
}
class C2 {
[s: Symbol]: () => { x: string };
[s: symbol]: () => { x: string };
}
@@ -5,5 +5,5 @@ class C1 extends C2 {
}
}
class C2 {
[s: Symbol]: () => { x: number };
[s: symbol]: () => { x: number };
}
@@ -1,4 +1,4 @@
//@target: ES5
interface I {
[s: Symbol]: string;
[s: symbol]: string;
}
@@ -1,4 +1,4 @@
//@target: ES5
class C {
[s: Symbol]: string;
[s: symbol]: string;
}
@@ -1,4 +1,4 @@
//@target: ES5
var x: {
[s: Symbol]: string;
[s: symbol]: string;
}
@@ -1,4 +1,4 @@
//@target: ES6
interface I {
[s: Symbol]: string;
[s: symbol]: string;
}
@@ -1,4 +1,4 @@
//@target: ES6
class C {
[s: Symbol]: string;
[s: symbol]: string;
}
@@ -1,4 +1,4 @@
//@target: ES6
class C {
static [s: Symbol]: string;
static [s: symbol]: string;
}
@@ -1,4 +1,4 @@
//@target: ES6
var x: {
[s: Symbol]: string;
[s: symbol]: string;
}
@@ -1,4 +1,4 @@
//@target: ES6
var x = {
[s: Symbol]: ""
[s: symbol]: ""
}