(variable: Variable, path: ObjectPath, context: InclusionContext)
| 1420 | } |
| 1421 | |
| 1422 | private includeVariable(variable: Variable, path: ObjectPath, context: InclusionContext): void { |
| 1423 | const { included, module: variableModule } = variable; |
| 1424 | variable.includePath(path, context); |
| 1425 | if (included) { |
| 1426 | if (variableModule instanceof Module && variableModule !== this) { |
| 1427 | getAndExtendSideEffectModules(variable, this); |
| 1428 | } |
| 1429 | return; |
| 1430 | } |
| 1431 | this.graph.needsTreeshakingPass = true; |
| 1432 | if (!(variableModule instanceof Module)) { |
| 1433 | return; |
| 1434 | } |
| 1435 | variableModule.includeModuleInExecution(); |
| 1436 | if (variableModule !== this) { |
| 1437 | const sideEffectModules = getAndExtendSideEffectModules(variable, this); |
| 1438 | for (const module of sideEffectModules) { |
| 1439 | module.includeModuleInExecution(); |
| 1440 | } |
| 1441 | } |
| 1442 | } |
| 1443 | |
| 1444 | private includeVariableInModule( |
| 1445 | variable: Variable, |
no test coverage detected