@@ -443,9 +443,9 @@ func (b *Binder) declareSymbolAndAddToSymbolTable(node *ast.Node, symbolFlags as
443
443
return b .declareClassMember (node , symbolFlags , symbolExcludes )
444
444
case ast .KindEnumDeclaration :
445
445
return b .declareSymbol (ast .GetExports (b .container .Symbol ()), b .container .Symbol (), node , symbolFlags , symbolExcludes )
446
- case ast .KindTypeLiteral , ast .KindJSDocTypeLiteral , ast . KindObjectLiteralExpression , ast .KindInterfaceDeclaration , ast .KindJsxAttributes :
446
+ case ast .KindTypeLiteral , ast .KindObjectLiteralExpression , ast .KindInterfaceDeclaration , ast .KindJsxAttributes :
447
447
return b .declareSymbol (ast .GetMembers (b .container .Symbol ()), b .container .Symbol (), node , symbolFlags , symbolExcludes )
448
- case ast .KindFunctionType , ast .KindConstructorType , ast .KindCallSignature , ast .KindConstructSignature , ast . KindJSDocSignature ,
448
+ case ast .KindFunctionType , ast .KindConstructorType , ast .KindCallSignature , ast .KindConstructSignature ,
449
449
ast .KindIndexSignature , ast .KindMethodDeclaration , ast .KindMethodSignature , ast .KindConstructor , ast .KindGetAccessor ,
450
450
ast .KindSetAccessor , ast .KindFunctionDeclaration , ast .KindFunctionExpression , ast .KindArrowFunction ,
451
451
ast .KindClassStaticBlockDeclaration , ast .KindTypeAliasDeclaration , ast .KindJSTypeAliasDeclaration , ast .KindMappedType :
@@ -672,10 +672,8 @@ func (b *Binder) bind(node *ast.Node) bool {
672
672
case ast .KindSetAccessor :
673
673
b .bindPropertyOrMethodOrAccessor (node , ast .SymbolFlagsSetAccessor , ast .SymbolFlagsSetAccessorExcludes )
674
674
case ast .KindFunctionType , ast .KindConstructorType :
675
- // !!! KindJSDocSignature
676
675
b .bindFunctionOrConstructorType (node )
677
676
case ast .KindTypeLiteral , ast .KindMappedType :
678
- // !!! KindJSDocTypeLiteral
679
677
b .bindAnonymousDeclaration (node , ast .SymbolFlagsTypeLiteral , ast .InternalSymbolNameType )
680
678
case ast .KindObjectLiteralExpression :
681
679
b .bindAnonymousDeclaration (node , ast .SymbolFlagsObjectLiteral , ast .InternalSymbolNameObject )
@@ -1109,10 +1107,6 @@ func (b *Binder) bindVariableDeclarationOrBindingElement(node *ast.Node) {
1109
1107
}
1110
1108
1111
1109
func (b * Binder ) bindParameter (node * ast.Node ) {
1112
- // !!!
1113
- // if node.kind == KindJSDocParameterTag && b.container.kind != KindJSDocSignature {
1114
- // return
1115
- // }
1116
1110
decl := node .AsParameterDeclaration ()
1117
1111
if b .inStrictMode && node .Flags & ast .NodeFlagsAmbient == 0 {
1118
1112
// It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a
@@ -1178,17 +1172,6 @@ func (b *Binder) bindBlockScopedDeclaration(node *ast.Node, symbolFlags ast.Symb
1178
1172
}
1179
1173
1180
1174
func (b * Binder ) bindTypeParameter (node * ast.Node ) {
1181
- // !!!
1182
- // if isJSDocTemplateTag(node.parent) {
1183
- // var container *HasLocals = getEffectiveContainerForJSDocTemplateTag(node.parent)
1184
- // if container {
1185
- // Debug.assertNode(container, canHaveLocals)
1186
- // /* TODO(TS-TO-GO) QuestionQuestionEqualsToken BinaryExpression: container.locals ??= createSymbolTable() */ TODO
1187
- // b.declareSymbol(container.locals /*parent*/, nil, node, SymbolFlagsTypeParameter, SymbolFlagsTypeParameterExcludes)
1188
- // } else {
1189
- // b.declareSymbolAndAddToSymbolTable(node, SymbolFlagsTypeParameter, SymbolFlagsTypeParameterExcludes)
1190
- // }
1191
- // }
1192
1175
if node .Parent .Kind == ast .KindInferType {
1193
1176
container := b .getInferTypeContainer (node .Parent )
1194
1177
if container != nil {
@@ -1621,10 +1604,6 @@ func (b *Binder) bindChildren(node *ast.Node) {
1621
1604
b .bindCallExpressionFlow (node )
1622
1605
case ast .KindNonNullExpression :
1623
1606
b .bindNonNullExpressionFlow (node )
1624
- // case *JSDocTypedefTag, *JSDocCallbackTag, *JSDocEnumTag:
1625
- // b.bindJSDocTypeAlias(node)
1626
- // case *JSDocImportTag:
1627
- // b.bindJSDocImportTag(node)
1628
1607
case ast .KindSourceFile :
1629
1608
sourceFile := node .AsSourceFile ()
1630
1609
b .bindEachStatementFunctionsFirst (sourceFile .Statements )
@@ -2553,7 +2532,7 @@ func SetValueDeclaration(symbol *ast.Symbol, node *ast.Node) {
2553
2532
func GetContainerFlags (node * ast.Node ) ContainerFlags {
2554
2533
switch node .Kind {
2555
2534
case ast .KindClassExpression , ast .KindClassDeclaration , ast .KindEnumDeclaration , ast .KindObjectLiteralExpression , ast .KindTypeLiteral ,
2556
- ast .KindJSDocTypeLiteral , ast . KindJsxAttributes :
2535
+ ast .KindJsxAttributes :
2557
2536
return ContainerFlagsIsContainer
2558
2537
case ast .KindInterfaceDeclaration :
2559
2538
return ContainerFlagsIsContainer | ContainerFlagsIsInterface
@@ -2568,7 +2547,7 @@ func GetContainerFlags(node *ast.Node) ContainerFlags {
2568
2547
fallthrough
2569
2548
case ast .KindConstructor , ast .KindClassStaticBlockDeclaration :
2570
2549
return ContainerFlagsIsContainer | ContainerFlagsIsControlFlowContainer | ContainerFlagsHasLocals | ContainerFlagsIsFunctionLike | ContainerFlagsIsThisContainer
2571
- case ast .KindMethodSignature , ast .KindCallSignature , ast .KindJSDocSignature , ast . KindFunctionType , ast .KindConstructSignature , ast .KindConstructorType :
2550
+ case ast .KindMethodSignature , ast .KindCallSignature , ast .KindFunctionType , ast .KindConstructSignature , ast .KindConstructorType :
2572
2551
return ContainerFlagsIsContainer | ContainerFlagsIsControlFlowContainer | ContainerFlagsHasLocals | ContainerFlagsIsFunctionLike
2573
2552
case ast .KindFunctionDeclaration :
2574
2553
return ContainerFlagsIsContainer | ContainerFlagsIsControlFlowContainer | ContainerFlagsHasLocals | ContainerFlagsIsFunctionLike | ContainerFlagsIsThisContainer
@@ -2605,9 +2584,6 @@ func isNarrowingExpression(expr *ast.Node) bool {
2605
2584
case ast .KindCallExpression :
2606
2585
return hasNarrowableArgument (expr )
2607
2586
case ast .KindParenthesizedExpression :
2608
- // if isJSDocTypeAssertion(expr) {
2609
- // return false
2610
- // }
2611
2587
return isNarrowingExpression (expr .AsParenthesizedExpression ().Expression )
2612
2588
case ast .KindNonNullExpression :
2613
2589
return isNarrowingExpression (expr .AsNonNullExpression ().Expression )
0 commit comments