acacode / acacode/swagger-typescript-api
Define instance member properties in class 'HttpClient ' as instance member methods
未关闭
- 主要语言
- TypeScript
- 星标
- 4.1k
- 派生
- 436
- PR 合并指标
- 30 天内没有已合并 PR
描述
Instead of rewriting the templates, I want to be able to extend the underlying HttpClient class, e.g.:
```
class ApiWithErrorHandling extends Api {
async request(params: FullRequestParams): Promise> {
try {
return super.request(params);
} catch (e) {
// do error handling (e.g. logout)
throw e;
}
}
}
```
which results in the following error:
`Class 'Api ' defines instance member property 'request', but extended class 'ApiWithErrorHandling' defines it as instance member function.`
Is there any reason, why the HttpClient class is designed that way?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。