Files
reiverr/src/lib/apis/api.interface.ts
2024-05-20 00:27:55 +03:00

20 lines
570 B
TypeScript

import type createClient from 'openapi-fetch';
export interface Api<Paths extends NonNullable<unknown>> {
getClient(): ReturnType<typeof createClient<Paths>>;
}
export interface ApiAsync<Paths extends NonNullable<unknown>> {
getClient(): Promise<ReturnType<typeof createClient<Paths>>>;
}
// export abstract class Api<Paths extends NonNullable<unknown>> {
// protected abstract baseUrl: string;
// protected abstract client: ReturnType<typeof createClient<Paths>>;
// protected abstract isLoggedIn: boolean;
//
// getApi() {
// return this.client;
// }
// }