()
| 350 | } |
| 351 | |
| 352 | private getModelExport(): string { |
| 353 | const docLines = this.model.documentation ?? '' |
| 354 | const modelLine = `Model ${this.model.name}\n` |
| 355 | const docs = `${modelLine}${docLines}` |
| 356 | |
| 357 | const modelTypeExport = ts |
| 358 | .moduleExport( |
| 359 | ts.typeDeclaration( |
| 360 | `${this.model.name}Model`, |
| 361 | ts |
| 362 | .namedType(`runtime.Types.Result.DefaultSelection`) |
| 363 | .addGenericArgument(ts.namedType(getPayloadName(this.model.name))), |
| 364 | ), |
| 365 | ) |
| 366 | .setDocComment(ts.docComment(docs)) |
| 367 | |
| 368 | return ts.stringify(modelTypeExport) |
| 369 | } |
| 370 | |
| 371 | public toTS(): string { |
| 372 | const { model } = this |
no test coverage detected