This commit is contained in:
tamaina 2023-05-21 14:15:45 +00:00
parent 89480d9029
commit 79f71acd42

View file

@ -43,7 +43,7 @@ export class APIClient {
} }
public request<E extends keyof Endpoints, P extends SchemaOrUndefined<D['defines'][number]['req']>, M extends IEndpointMeta = Endpoints[E]>( public request<E extends keyof Endpoints, P extends SchemaOrUndefined<D['defines'][number]['req']>, M extends IEndpointMeta = Endpoints[E]>(
endpoint: E, params: P, credential?: string | null | undefined, endpoint: E, params?: P, credential?: string | null | undefined,
): Promise<ResponseOf<M, P>> ): Promise<ResponseOf<M, P>>
{ {
const promise = new Promise((resolve, reject) => { const promise = new Promise((resolve, reject) => {
@ -74,6 +74,6 @@ export class APIClient {
}).catch(reject); }).catch(reject);
}); });
return promise as Promise<ResponseOf<M, P>>; return promise as any;
} }
} }