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

Method bindModuleExportsAssignment

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

Source from the content-addressed store, hash-verified

1014}
1015
1016func (b *Binder) bindModuleExportsAssignment(node *ast.Node) {
1017 if b.setCommonJSModuleIndicator(node) {
1018 container := b.file.AsNode()
1019 flags := core.IfElse(ast.ExpressionIsAlias(node.AsBinaryExpression().Right), ast.SymbolFlagsAlias, ast.SymbolFlagsProperty)
1020 symbol := b.declareSymbol(ast.GetExports(container.Symbol()), container.Symbol(), node, flags, 0)
1021 SetValueDeclaration(symbol, node)
1022 }
1023}
1024
1025func (b *Binder) bindExpandoPropertyAssignment(node *ast.Node) {
1026 b.expandoAssignments = append(b.expandoAssignments, ExpandoAssignmentInfo{

Callers 1

bindMethod · 0.95

Calls 9

declareSymbolMethod · 0.95
IfElseFunction · 0.92
ExpressionIsAliasFunction · 0.92
GetExportsFunction · 0.92
SetValueDeclarationFunction · 0.85
AsBinaryExpressionMethod · 0.80
AsNodeMethod · 0.65
SymbolMethod · 0.65

Tested by

no test coverage detected