conprehensiveness check

This commit is contained in:
FineArchs 2024-10-11 15:17:01 +09:00
parent 70bb365cd1
commit fcce5b98b1
2 changed files with 4 additions and 1 deletions

View File

@ -114,7 +114,7 @@ export class CustomEmojiService implements OnApplicationShutdown {
localOnly?: boolean;
roleIdsThatCanBeUsedThisEmojiAsReaction?: MiRole['id'][];
}, moderator?: MiUser): Promise<
void
undefined
| 'NO_SUCH_EMOJI'
| 'SAME_NAME_EMOJI_EXISTS'
> {
@ -171,6 +171,7 @@ export class CustomEmojiService implements OnApplicationShutdown {
after: updated,
});
}
return undefined;
}
@bindThis

View File

@ -98,6 +98,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
case undefined: return;
case 'NO_SUCH_EMOJI': throw new ApiError(meta.errors.noSuchEmoji);
case 'SAME_NAME_EMOJI_EXISTS': throw new ApiError(meta.errors.sameNameEmojiExists);
// 網羅性チェック
default: const mustBeNever: never = error;
}
});
}