* 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)
| 968 | * `export type * from './x'` keeps its `type` (#2474). |
| 969 | */ |
| 970 | private importSource(node: SyntaxNode): string { |
| 971 | if (node.type !== 'export_statement' || this.sourceAsWritten === null) return this.source; |
| 972 | this.reExportsAsWritten ??= this.extractor?.reExportAsWritten?.(this.sourceAsWritten) === true; |
| 973 | return this.reExportsAsWritten ? this.sourceAsWritten : this.source; |
| 974 | } |
| 975 | |
| 976 | /** |
| 977 | * Parse and extract from the source code |