mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
Make BaseHttpRequest abstract
* it's not meant for instantiation anyways, right? * it'll prevent TS compile error TS6133 when `noUnusedParameters` compiler option is enabled
This commit is contained in:
parent
b3530b14fc
commit
b7c1cbe8e5
@ -12,7 +12,7 @@ import type { CancelablePromise } from './CancelablePromise';
|
||||
import type { OpenAPIConfig } from './OpenAPI';
|
||||
{{/equals}}
|
||||
|
||||
export class BaseHttpRequest {
|
||||
export abstract class BaseHttpRequest {
|
||||
|
||||
{{#equals @root.httpClient 'angular'}}
|
||||
constructor(
|
||||
@ -24,12 +24,8 @@ export class BaseHttpRequest {
|
||||
{{/equals}}
|
||||
|
||||
{{#equals @root.httpClient 'angular'}}
|
||||
public request<T>(options: ApiRequestOptions): Observable<T> {
|
||||
throw new Error('Not Implemented');
|
||||
}
|
||||
public abstract request<T>(options: ApiRequestOptions): Observable<T>;
|
||||
{{else}}
|
||||
public request<T>(options: ApiRequestOptions): CancelablePromise<T> {
|
||||
throw new Error('Not Implemented');
|
||||
}
|
||||
public abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
|
||||
{{/equals}}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user