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

Method setCommonJSModuleIndicator

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

Source from the content-addressed store, hash-verified

930}
931
932func (b *Binder) setCommonJSModuleIndicator(node *ast.Node) bool {
933 if b.file.ExternalModuleIndicator != nil && b.file.ExternalModuleIndicator != b.file.AsNode() {
934 return false
935 }
936 if b.file.CommonJSModuleIndicator == nil {
937 b.file.CommonJSModuleIndicator = node
938 if b.file.ExternalModuleIndicator == nil {
939 b.bindSourceFileAsExternalModule()
940 }
941 }
942 return true
943}
944
945func (b *Binder) bindClassLikeDeclaration(node *ast.Node) {
946 name := node.Name()

Calls 2

AsNodeMethod · 0.65

Tested by

no test coverage detected