* The text an import node reads its statement from: for a re-export, the * source as written when the extractor asks (`reExportAsWritten`), so * `export type * from './x'` keeps its `type` (#2474).
(node: SyntaxNode)
| 1004 | * `export type * from './x'` keeps its `type` (#2474). |
| 1005 | */ |
| 1006 | private importSource(node: SyntaxNode): string { |
| 1007 | if (node.type !== 'export_statement' || this.sourceAsWritten === null) return this.source; |
| 1008 | this.reExportsAsWritten ??= this.extractor?.reExportAsWritten?.(this.sourceAsWritten) === true; |
| 1009 | return this.reExportsAsWritten ? this.sourceAsWritten : this.source; |
| 1010 | } |
| 1011 | |
| 1012 | /** |
| 1013 | * Parse and extract from the source code |