acacode / acacode/swagger-typescript-api
Define instance member properties in class 'HttpClient ' as instance member methods
- Lenguaje dominante
- TypeScript
- Estrellas
- 4.1k
- Forks
- 436
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.