fix type error. 204 status response casts to any type. #3
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ export function request<E extends keyof Endpoints>(
|
|||
if (res.status === 200) {
|
||||
resolve(body);
|
||||
} else if (res.status === 204) {
|
||||
resolve(null);
|
||||
resolve(null as any);
|
||||
} else {
|
||||
reject(body.error);
|
||||
}
|
||||
|
|
Reference in a new issue