Generic Commit; Most likely a fix or small feature
This commit is contained in:
@@ -5,21 +5,29 @@ export type ServiceResult<T = unknown> = {
|
||||
successful: boolean;
|
||||
};
|
||||
|
||||
export abstract class Client {
|
||||
export abstract class BaseClient {
|
||||
private axiosInstance: AxiosInstance;
|
||||
|
||||
constructor(axiosInstance: AxiosInstance) {
|
||||
this.axiosInstance = axiosInstance;
|
||||
}
|
||||
|
||||
getAxios(): AxiosInstance {
|
||||
return this.axiosInstance;
|
||||
}
|
||||
}
|
||||
|
||||
export abstract class Service<T> {
|
||||
export abstract class BaseService<T> {
|
||||
private client: T;
|
||||
|
||||
constructor(client: T) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
getClient(): T {
|
||||
return this.client;
|
||||
}
|
||||
|
||||
getSuccessfulResult<R = unknown>(result: R): ServiceResult<R> {
|
||||
return {
|
||||
result,
|
||||
|
||||
Reference in New Issue
Block a user