| 65 | } |
| 66 | |
| 67 | export class NamedImport implements BasicBuilder { |
| 68 | private alias: string | undefined |
| 69 | private type = false |
| 70 | |
| 71 | constructor(readonly name: string) {} |
| 72 | |
| 73 | as(alias: string) { |
| 74 | this.alias = alias |
| 75 | return this |
| 76 | } |
| 77 | |
| 78 | typeOnly() { |
| 79 | this.type = true |
| 80 | return this |
| 81 | } |
| 82 | |
| 83 | write(writer: Writer): void { |
| 84 | if (this.type) { |
| 85 | writer.write(class="st">'type ') |
| 86 | } |
| 87 | writer.write(this.name) |
| 88 | if (this.alias) { |
| 89 | writer.write(class="st">' as ').write(this.alias) |
| 90 | } |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | export class ModuleImport implements BasicBuilder { |
| 95 | constructor(readonly from: string) {} |
nothing calls this directly
no outgoing calls
no test coverage detected