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

Method bindFunctionExpression

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

Source from the content-addressed store, hash-verified

909}
910
911func (b *Binder) bindFunctionExpression(node *ast.Node) {
912 if !b.file.IsDeclarationFile && node.Flags&ast.NodeFlagsAmbient == 0 && ast.IsAsyncFunction(node) {
913 b.emitFlags |= ast.NodeFlagsHasAsyncFunctions
914 }
915 setFlowNode(node, b.currentFlow)
916 bindingName := ast.InternalSymbolNameFunction
917 if ast.IsFunctionExpression(node) && node.AsFunctionExpression().Name() != nil {
918 b.checkStrictModeFunctionName(node)
919 bindingName = node.AsFunctionExpression().Name().Text()
920 }
921 b.bindAnonymousDeclaration(node, ast.SymbolFlagsFunction, bindingName)
922}
923
924func (b *Binder) bindCallExpression(node *ast.Node) {
925 // We're only inspecting call expressions to detect CommonJS modules, so we can skip

Callers 1

bindMethod · 0.95

Calls 8

IsAsyncFunctionFunction · 0.92
IsFunctionExpressionFunction · 0.92
setFlowNodeFunction · 0.85
AsFunctionExpressionMethod · 0.80
NameMethod · 0.65
TextMethod · 0.65

Tested by

no test coverage detected