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

Method bindBlockScopedDeclaration

internal/binder/binder.go:1244–1257  ·  view source on GitHub ↗
(node *ast.Node, symbolFlags ast.SymbolFlags, symbolExcludes ast.SymbolFlags)

Source from the content-addressed store, hash-verified

1242}
1243
1244func (b *Binder) bindBlockScopedDeclaration(node *ast.Node, symbolFlags ast.SymbolFlags, symbolExcludes ast.SymbolFlags) {
1245 switch b.blockScopeContainer.Kind {
1246 case ast.KindModuleDeclaration:
1247 b.declareModuleMember(node, symbolFlags, symbolExcludes)
1248 case ast.KindSourceFile:
1249 if ast.IsExternalOrCommonJSModule(b.container.AsSourceFile()) {
1250 b.declareModuleMember(node, symbolFlags, symbolExcludes)
1251 break
1252 }
1253 fallthrough
1254 default:
1255 b.declareSymbol(ast.GetLocals(b.blockScopeContainer), nil /*parent*/, node, symbolFlags, symbolExcludes)
1256 }
1257}
1258
1259func (b *Binder) bindTypeParameter(node *ast.Node) {
1260 if node.Parent.Kind == ast.KindInferType {

Callers 6

bindMethod · 0.95
bindEnumDeclarationMethod · 0.95
bindContainerMethod · 0.95

Calls 5

declareModuleMemberMethod · 0.95
declareSymbolMethod · 0.95
GetLocalsFunction · 0.92
AsSourceFileMethod · 0.80

Tested by

no test coverage detected