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

Function IsAmbientModule

internal/ast/utilities.go:1633–1635  ·  view source on GitHub ↗
(node *Node)

Source from the content-addressed store, hash-verified

1631}
1632
1633func IsAmbientModule(node *Node) bool {
1634 return IsModuleDeclaration(node) && (node.AsModuleDeclaration().Name().Kind == KindStringLiteral || IsGlobalScopeAugmentation(node))
1635}
1636
1637func IsAmbientModuleSymbolName(s string) bool {
1638 return strings.HasPrefix(s, "\"") && strings.HasSuffix(s, "\"")

Calls 4

IsModuleDeclarationFunction · 0.85
AsModuleDeclarationMethod · 0.80
NameMethod · 0.65

Tested by

no test coverage detected