(node *ast.Node)
| 14571 | } |
| 14572 | |
| 14573 | func (c *Checker) getTargetOfImportSpecifier(node *ast.Node) *ast.Symbol { |
| 14574 | name := node.PropertyNameOrName() |
| 14575 | if ast.IsImportSpecifier(node) && ast.ModuleExportNameIsDefault(name) { |
| 14576 | specifier := c.getModuleSpecifierForImportOrExport(node) |
| 14577 | if specifier != nil { |
| 14578 | moduleSymbol := c.resolveExternalModuleName(node, specifier, false /*ignoreErrors*/) |
| 14579 | if moduleSymbol != nil { |
| 14580 | return c.getTargetOfModuleDefault(moduleSymbol, node, true /*dontResolveAlias*/) |
| 14581 | } |
| 14582 | } |
| 14583 | } |
| 14584 | root := node.Parent.Parent.Parent // ImportDeclaration |
| 14585 | if ast.IsBindingElement(node) { |
| 14586 | root = ast.GetRootDeclaration(node) |
| 14587 | } |
| 14588 | resolved := c.getExternalModuleMember(root, node, true /*dontResolveAlias*/) |
| 14589 | c.markSymbolOfAliasDeclarationIfTypeOnly(node, nil) |
| 14590 | return resolved |
| 14591 | } |
| 14592 | |
| 14593 | func (c *Checker) getExternalModuleMember(node *ast.Node, specifier *ast.Node, dontResolveAlias bool) *ast.Symbol { |
| 14594 | // node is ImportDeclaration | ExportDeclaration | VariableDeclaration |
no test coverage detected