(writer: Writer)
| 41 | } |
| 42 | |
| 43 | write(writer: Writer): void { |
| 44 | writer.write('interface ').write(this.name) |
| 45 | if (this.genericParameters.length > 0) { |
| 46 | writer.write('<').writeJoined(', ', this.genericParameters).write('>') |
| 47 | } |
| 48 | |
| 49 | if (this.extendedTypes.length > 0) { |
| 50 | writer.write(' extends ').writeJoined(', ', this.extendedTypes) |
| 51 | } |
| 52 | if (this.items.length === 0) { |
| 53 | writer.writeLine(' {}') |
| 54 | return |
| 55 | } |
| 56 | |
| 57 | writer |
| 58 | .writeLine(' {') |
| 59 | .withIndent(() => { |
| 60 | for (const item of this.items) { |
| 61 | writer.writeLine(item) |
| 62 | } |
| 63 | }) |
| 64 | .write('}') |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | export function interfaceDeclaration(name: string) { |
nothing calls this directly
no test coverage detected