(node *ast.Node)
| 45 | } |
| 46 | |
| 47 | func isModuleSpecifierLike(node *ast.Node) bool { |
| 48 | if !ast.IsStringLiteralLike(node) { |
| 49 | return false |
| 50 | } |
| 51 | |
| 52 | if ast.IsRequireCall(node.Parent, false /*requireStringLiteralLikeArgument*/) || ast.IsImportCall(node.Parent) { |
| 53 | return node.Parent.Arguments()[0] == node |
| 54 | } |
| 55 | |
| 56 | return node.Parent.Kind == ast.KindExternalModuleReference || |
| 57 | node.Parent.Kind == ast.KindImportDeclaration || |
| 58 | node.Parent.Kind == ast.KindJSImportDeclaration |
| 59 | } |
| 60 | |
| 61 | func getNonModuleSymbolOfMergedModuleSymbol(symbol *ast.Symbol) *ast.Symbol { |
| 62 | if len(symbol.Declarations) == 0 || (symbol.Flags&(ast.SymbolFlagsModule|ast.SymbolFlagsTransient)) == 0 { |
no test coverage detected