| 92 | } |
| 93 | |
| 94 | export class ModuleImport implements BasicBuilder { |
| 95 | constructor(readonly from: string) {} |
| 96 | |
| 97 | asNamespace(alias: string): NamespaceImport { |
| 98 | return new NamespaceImport(alias, this.from) |
| 99 | } |
| 100 | |
| 101 | default(alias: string): BindingsImport { |
| 102 | return new BindingsImport(this.from).default(alias) |
| 103 | } |
| 104 | |
| 105 | named(namedImport: string | NamedImport) { |
| 106 | return new BindingsImport(this.from).named(namedImport) |
| 107 | } |
| 108 | |
| 109 | write(writer: Writer): void { |
| 110 | writer.write('import ').write(`"${this.from}"`) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | export function moduleImport(from: string) { |
| 115 | return new ModuleImport(from) |
nothing calls this directly
no outgoing calls
no test coverage detected