wip
This commit is contained in:
parent
89480d9029
commit
79f71acd42
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue