conprehensiveness check
This commit is contained in:
parent
70bb365cd1
commit
fcce5b98b1
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue