@@ -2903,7 +2903,7 @@ func (c *Checker) checkTypePredicate(node *ast.Node) {
2903
2903
}
2904
2904
2905
2905
func (c *Checker) getTypePredicateParent(node *ast.Node) *ast.SignatureDeclaration {
2906
- parent := ast.GetEffectiveTypeParent( node.Parent)
2906
+ parent := node.Parent
2907
2907
switch parent.Kind {
2908
2908
case ast.KindArrowFunction, ast.KindCallSignature, ast.KindFunctionDeclaration, ast.KindFunctionExpression, ast.KindFunctionType,
2909
2909
ast.KindMethodDeclaration, ast.KindMethodSignature:
@@ -13971,9 +13971,6 @@ func (c *Checker) getTargetOfImportSpecifier(node *ast.Node, dontResolveAlias bo
13971
13971
}
13972
13972
}
13973
13973
root := node.Parent.Parent.Parent // ImportDeclaration
13974
- if root.Kind == ast.KindJSDocImportTag {
13975
- root = root.AsJSDocImportTag().JSImportDeclaration.AsNode()
13976
- }
13977
13974
if ast.IsBindingElement(node) {
13978
13975
root = ast.GetRootDeclaration(node)
13979
13976
}
@@ -14344,8 +14341,6 @@ func (c *Checker) getModuleSpecifierForImportOrExport(node *ast.Node) *ast.Node
14344
14341
14345
14342
func getModuleSpecifierFromNode(node *ast.Node) *ast.Node {
14346
14343
switch node.Kind {
14347
- case ast.KindJSDocImportTag:
14348
- return node.AsJSDocImportTag().JSImportDeclaration.ModuleSpecifier
14349
14344
case ast.KindImportDeclaration, ast.KindJSImportDeclaration:
14350
14345
return node.AsImportDeclaration().ModuleSpecifier
14351
14346
case ast.KindExportDeclaration:
@@ -14449,12 +14444,6 @@ func (c *Checker) resolveExternalModule(location *ast.Node, moduleReference stri
14449
14444
contextSpecifier = location.AsVariableDeclaration().Initializer.AsCallExpression().Arguments.Nodes[0]
14450
14445
} else {
14451
14446
var ancestor *ast.Node
14452
- if location.Flags&ast.NodeFlagsJSDoc != 0 {
14453
- ancestor = ast.FindAncestor(location, ast.IsJSDocImportTag)
14454
- if ancestor != nil {
14455
- contextSpecifier = ancestor.AsJSDocImportTag().JSImportDeclaration.ModuleSpecifier
14456
- }
14457
- }
14458
14447
if ancestor == nil {
14459
14448
ancestor = ast.FindAncestor(location, ast.IsImportCall)
14460
14449
if ancestor != nil {
@@ -22039,7 +22028,6 @@ func (c *Checker) getTypeFromTypeOperatorNode(node *ast.Node) *Type {
22039
22028
}
22040
22029
22041
22030
func (c *Checker) getESSymbolLikeTypeForNode(node *ast.Node) *Type {
22042
- node = ast.GetEffectiveTypeParent(node)
22043
22031
if isValidESSymbolDeclaration(node) {
22044
22032
symbol := c.getSymbolOfNode(node)
22045
22033
if symbol != nil {
@@ -22710,9 +22698,9 @@ func (c *Checker) getAliasForTypeNode(node *ast.Node) *TypeAlias {
22710
22698
}
22711
22699
22712
22700
func (c *Checker) getAliasSymbolForTypeNode(node *ast.Node) *ast.Symbol {
22713
- host := ast.GetEffectiveTypeParent( node.Parent)
22701
+ host := node.Parent
22714
22702
for ast.IsParenthesizedTypeNode(host) || ast.IsTypeOperatorNode(host) && host.AsTypeOperatorNode().Operator == ast.KindReadonlyKeyword {
22715
- host = ast.GetEffectiveTypeParent( host.Parent)
22703
+ host = host.Parent
22716
22704
}
22717
22705
if isTypeAlias(host) {
22718
22706
return c.getSymbolOfDeclaration(host)
@@ -22748,7 +22736,7 @@ func (c *Checker) getOuterTypeParametersOfClassOrInterface(symbol *ast.Symbol) [
22748
22736
// Return the outer type parameters of a node or undefined if the node has no outer type parameters.
22749
22737
func (c *Checker) getOuterTypeParameters(node *ast.Node, includeThisTypes bool) []*Type {
22750
22738
for {
22751
- node = ast.GetEffectiveTypeParent( node.Parent)
22739
+ node = node.Parent
22752
22740
if node == nil {
22753
22741
return nil
22754
22742
}
0 commit comments