(writer: Writer)
| 29 | } |
| 30 | |
| 31 | write(writer: Writer): void { |
| 32 | if (this.docComment) { |
| 33 | writer.write(this.docComment) |
| 34 | } |
| 35 | writer.write('type ').write(this.name) |
| 36 | if (this.genericParameters.length > 0) { |
| 37 | writer.write('<').writeJoined(', ', this.genericParameters).write('>') |
| 38 | } |
| 39 | writer.write(' = ').write(this.type) |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | export function typeDeclaration<InnerType extends TypeBuilder = TypeBuilder>(name: string, type: InnerType) { |
nothing calls this directly
no test coverage detected