nullableを一旦抑止

This commit is contained in:
Kisaragi Marine 2024-07-09 19:44:26 +09:00
parent 48c541d822
commit 6871868675
No known key found for this signature in database
GPG Key ID: C6631564CD2110E4
1 changed files with 2 additions and 1 deletions

View File

@ -143,7 +143,8 @@ export const post = async (user: UserToken, params: misskey.Endpoints['notes/cre
const res = await api('notes/create', q, user);
return res.body ? res.body.createdNote : null;
// FIXME: the return type should reflect this fact.
return (res.body ? res.body.createdNote : null)!;
};
export const createAppToken = async (user: UserToken, permissions: (typeof misskey.permissions)[number][]) => {