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

Method bindTypeParameter

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

Source from the content-addressed store, hash-verified

1257}
1258
1259func (b *Binder) bindTypeParameter(node *ast.Node) {
1260 if node.Parent.Kind == ast.KindInferType {
1261 container := b.getInferTypeContainer(node.Parent)
1262 if container != nil {
1263 b.declareSymbol(ast.GetLocals(container), nil /*parent*/, node, ast.SymbolFlagsTypeParameter, ast.SymbolFlagsTypeParameterExcludes)
1264 } else {
1265 b.bindAnonymousDeclaration(node, ast.SymbolFlagsTypeParameter, b.getDeclarationName(node))
1266 }
1267 } else {
1268 b.declareSymbolAndAddToSymbolTable(node, ast.SymbolFlagsTypeParameter, ast.SymbolFlagsTypeParameterExcludes)
1269 }
1270}
1271
1272func (b *Binder) lookupEntity(node *ast.Node, container *ast.Node) *ast.Symbol {
1273 if ast.IsIdentifier(node) {

Callers 1

bindMethod · 0.95

Calls 6

getInferTypeContainerMethod · 0.95
declareSymbolMethod · 0.95
getDeclarationNameMethod · 0.95
GetLocalsFunction · 0.92

Tested by

no test coverage detected