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

Method bindExportDeclaration

internal/binder/binder.go:847–858  ·  view source on GitHub ↗
(node *ast.Node)

Source from the content-addressed store, hash-verified

845}
846
847func (b *Binder) bindExportDeclaration(node *ast.Node) {
848 decl := node.AsExportDeclaration()
849 if b.container.Symbol() == nil {
850 // Export * in some sort of block construct
851 b.bindAnonymousDeclaration(node, ast.SymbolFlagsExportStar, b.getDeclarationName(node))
852 } else if decl.ExportClause == nil {
853 // All export * declarations are collected in an __export symbol
854 b.declareSymbol(ast.GetExports(b.container.Symbol()), b.container.Symbol(), node, ast.SymbolFlagsExportStar, ast.SymbolFlagsNone)
855 } else if ast.IsNamespaceExport(decl.ExportClause) {
856 b.declareSymbol(ast.GetExports(b.container.Symbol()), b.container.Symbol(), decl.ExportClause, ast.SymbolFlagsAlias, ast.SymbolFlagsAliasExcludes)
857 }
858}
859
860func (b *Binder) bindExportAssignment(node *ast.Node) {
861 container := b.container

Callers 1

bindMethod · 0.95

Calls 7

getDeclarationNameMethod · 0.95
declareSymbolMethod · 0.95
GetExportsFunction · 0.92
IsNamespaceExportFunction · 0.92
AsExportDeclarationMethod · 0.80
SymbolMethod · 0.65

Tested by

no test coverage detected