MCPcopy Create free account
hub / github.com/microsoft/typescript-go / ModuleSpecifier

Method ModuleSpecifier

internal/ast/ast.go:985–995  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

983}
984
985func (n *Node) ModuleSpecifier() *Expression {
986 switch n.Kind {
987 case KindImportDeclaration, KindJSImportDeclaration:
988 return n.AsImportDeclaration().ModuleSpecifier
989 case KindExportDeclaration:
990 return n.AsExportDeclaration().ModuleSpecifier
991 case KindJSDocImportTag:
992 return n.AsJSDocImportTag().ModuleSpecifier
993 }
994 panic("Unhandled case in Node.ModuleSpecifier: " + n.Kind.String())
995}
996
997func (n *Node) ImportClause() *Node {
998 switch n.Kind {

Calls 5

AsImportDeclarationMethod · 0.95
AsExportDeclarationMethod · 0.95
AsJSDocImportTagMethod · 0.95
panicFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected