MCPcopy
hub / github.com/rollup/rollup / includeMemberPath

Method includeMemberPath

src/ast/variables/NamespaceVariable.ts:107–122  ·  view source on GitHub ↗
(path: ObjectPath, context: InclusionContext)

Source from the content-addressed store, hash-verified

105 }
106
107 includeMemberPath(path: ObjectPath, context: InclusionContext): void {
108 if (path.length > 0) {
109 const [name, ...remainingPath] = path;
110 if (typeof name === 'string') {
111 const variable = this.module.getExportedVariablesByName().get(name);
112 if (variable) {
113 this.context.includeVariableInModule(variable, remainingPath, context);
114 } else {
115 this.includeNonExplicitNamespaces();
116 }
117 } else if (name) {
118 this.module.includeAllExports();
119 this.includeNonExplicitNamespaces();
120 }
121 }
122 }
123
124 prepare(accessedGlobalsByScope: Map<ChildScope, Set<string>>): void {
125 if (this.mergedNamespaces.length > 0) {

Callers 3

includePathMethod · 0.95
valueFunction · 0.80
includePathMethod · 0.80

Calls 5

getMethod · 0.80
includeAllExportsMethod · 0.80

Tested by

no test coverage detected