change return type of `failedApiCall` to `void`

戻り値がどこにも使われていない
This commit is contained in:
Kisaragi Marine 2024-06-21 04:37:18 +09:00
parent a6db224a9f
commit c884abb487
No known key found for this signature in database
GPG Key ID: C6631564CD2110E4
1 changed files with 2 additions and 2 deletions

View File

@ -51,11 +51,11 @@ export const successfulApiCall = async <E extends keyof misskey.Endpoints, P ext
return res.body;
};
export const failedApiCall = async <T, E extends keyof misskey.Endpoints, P extends misskey.Endpoints[E]['req']>(request: ApiRequest<E, P>, assertion: {
export const failedApiCall = async <E extends keyof misskey.Endpoints, P extends misskey.Endpoints[E]['req']>(request: ApiRequest<E, P>, assertion: {
status: number,
code: string,
id: string
}): Promise<T> => {
}): Promise<void> => {
const { endpoint, parameters, user } = request;
const { status, code, id } = assertion;
const res = await api(endpoint, parameters, user);