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

Function isCommonJSModuleExports

internal/checker/emitresolver.go:249–258  ·  view source on GitHub ↗
(node *ast.Node)

Source from the content-addressed store, hash-verified

247}
248
249func isCommonJSModuleExports(node *ast.Node) bool {
250 if ast.IsBinaryExpression(node) && ast.IsExpressionStatement(node.Parent) && ast.IsSourceFile(node.Parent.Parent) &&
251 node.Parent.Parent.AsSourceFile().CommonJSModuleIndicator != nil {
252 switch ast.GetAssignmentDeclarationKind(node) {
253 case ast.JSDeclarationKindModuleExports, ast.JSDeclarationKindExportsProperty:
254 return true
255 }
256 }
257 return false
258}
259
260func (r *EmitResolver) aliasMarkingVisitorWorker(node *ast.Node) bool {
261 switch node.Kind {

Callers 3

markLinkedAliasesMethod · 0.85

Calls 5

IsBinaryExpressionFunction · 0.92
IsExpressionStatementFunction · 0.92
IsSourceFileFunction · 0.92
AsSourceFileMethod · 0.80

Tested by

no test coverage detected