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

Method getExportOfModule

internal/checker/checker.go:14715–14724  ·  view source on GitHub ↗
(symbol *ast.Symbol, nameText string, specifier *ast.Node, dontResolveAlias bool)

Source from the content-addressed store, hash-verified

14713}
14714
14715func (c *Checker) getExportOfModule(symbol *ast.Symbol, nameText string, specifier *ast.Node, dontResolveAlias bool) *ast.Symbol {
14716 if symbol.Flags&ast.SymbolFlagsModule != 0 {
14717 exportSymbol := c.getExportsOfSymbol(symbol)[nameText]
14718 resolved := c.resolveSymbolEx(exportSymbol, dontResolveAlias)
14719 exportStarDeclaration := c.moduleSymbolLinks.Get(symbol).typeOnlyExportStarMap[nameText]
14720 c.markSymbolOfAliasDeclarationIfTypeOnly(specifier, exportStarDeclaration)
14721 return resolved
14722 }
14723 return nil
14724}
14725
14726func (c *Checker) isOnlyImportableAsDefault(usage *ast.Node, resolvedModule *ast.Symbol) bool {
14727 // In Node.js, JSON modules don't get named exports

Calls 4

getExportsOfSymbolMethod · 0.95
resolveSymbolExMethod · 0.95
GetMethod · 0.65

Tested by

no test coverage detected