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

Method bindCallExpression

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

Source from the content-addressed store, hash-verified

922}
923
924func (b *Binder) bindCallExpression(node *ast.Node) {
925 // We're only inspecting call expressions to detect CommonJS modules, so we can skip
926 // this check if we've already seen the module indicator
927 if b.file.CommonJSModuleIndicator == nil && ast.IsRequireCall(node, false /*requireStringLiteralLikeArgument*/) {
928 b.setCommonJSModuleIndicator(node)
929 }
930}
931
932func (b *Binder) setCommonJSModuleIndicator(node *ast.Node) bool {
933 if b.file.ExternalModuleIndicator != nil && b.file.ExternalModuleIndicator != b.file.AsNode() {

Callers 1

bindMethod · 0.95

Calls 2

IsRequireCallFunction · 0.92

Tested by

no test coverage detected