(writer: Writer)
| 44 | } |
| 45 | |
| 46 | write(writer: Writer): void { |
| 47 | writer.write('import ') |
| 48 | if (this.defaultImport) { |
| 49 | writer.write(this.defaultImport) |
| 50 | if (this.hasNamedImports()) { |
| 51 | writer.write(', ') |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | if (this.hasNamedImports()) { |
| 56 | writer.write('{ ').writeJoined(', ', this.namedImports).write(' }') |
| 57 | } |
| 58 | |
| 59 | writer.write(` from "${this.from}"`) |
| 60 | } |
| 61 | |
| 62 | private hasNamedImports() { |
| 63 | return this.namedImports.length > 0 |
nothing calls this directly
no test coverage detected