| 4 | export type Import = NamespaceImport | BindingsImport | ModuleImport; |
| 5 | |
| 6 | export class NamespaceImport implements BasicBuilder { |
| 7 | private type = false; |
| 8 | |
| 9 | constructor( |
| 10 | readonly alias: string, |
| 11 | readonly from: string |
| 12 | ) {} |
| 13 | |
| 14 | typeOnly() { |
| 15 | this.type = true; |
| 16 | return this; |
| 17 | } |
| 18 | |
| 19 | write(writer: Writer<undefined>): void { |
| 20 | writer.write('import '); |
| 21 | if (this.type) { |
| 22 | writer.write('type '); |
| 23 | } |
| 24 | writer.write('* as ').write(this.alias).write(` from "${this.from}"`); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | export class BindingsImport implements BasicBuilder { |
| 29 | private defaultImport: string | undefined; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…