* Registers a side-effect import, preserving its first registration order.
(module: string, attributes = "")
| 588 | * Registers a side-effect import, preserving its first registration order. |
| 589 | */ |
| 590 | addSideEffect(module: string, attributes = ""): this { |
| 591 | const source = `import ${literal(module)}${attributes}` |
| 592 | if (!this.#sideEffects.has(source)) { |
| 593 | this.#sideEffects.add(source) |
| 594 | this.#importOrder.push(source) |
| 595 | } |
| 596 | return this |
| 597 | } |
| 598 | |
| 599 | /** |
| 600 | * Appends a source fragment after the module's declarations. |
no test coverage detected