(hook: StubHook)
| 526 | } |
| 527 | |
| 528 | exportPromise(hook: StubHook): ExportId { |
| 529 | if (this.abortReason) throw this.abortReason; |
| 530 | |
| 531 | // Promises always use a new ID because otherwise the recipient could miss the resolution. |
| 532 | let exportId = this.nextExportId--; |
| 533 | this.exports[exportId] = { hook, refcount: 1 }; |
| 534 | this.reverseExports.set(hook, exportId); |
| 535 | |
| 536 | // Automatically start resolving any promises we send. |
| 537 | this.ensureResolvingExport(exportId); |
| 538 | return exportId; |
| 539 | } |
| 540 | |
| 541 | unexport(ids: Array<ExportId>): void { |
| 542 | for (let id of ids) { |
nothing calls this directly
no test coverage detected