* Gets terminal binding. * @param {ModuleGraph} moduleGraph the module graph * @param {ResolveTargetFilter} resolveTargetFilter filter function to further resolve target * @returns {ExportInfo | ExportsInfo | undefined} the terminal binding export(s) info if known
(moduleGraph, resolveTargetFilter = RETURNS_TRUE)
| 1533 | * @returns {ExportInfo | ExportsInfo | undefined} the terminal binding export(s) info if known |
| 1534 | */ |
| 1535 | getTerminalBinding(moduleGraph, resolveTargetFilter = RETURNS_TRUE) { |
| 1536 | if (this.terminalBinding) return this; |
| 1537 | const target = this.getTarget(moduleGraph, resolveTargetFilter); |
| 1538 | if (!target) return; |
| 1539 | const exportsInfo = moduleGraph.getExportsInfo(target.module); |
| 1540 | if (!target.export) return exportsInfo; |
| 1541 | return exportsInfo.getReadOnlyExportInfoRecursive(target.export); |
| 1542 | } |
| 1543 | |
| 1544 | isReexport() { |
| 1545 | return !this.terminalBinding && this._target && this._target.size > 0; |
no test coverage detected