conprehensiveness check
This commit is contained in:
parent
70bb365cd1
commit
fcce5b98b1
|
@ -114,7 +114,7 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
||||||
localOnly?: boolean;
|
localOnly?: boolean;
|
||||||
roleIdsThatCanBeUsedThisEmojiAsReaction?: MiRole['id'][];
|
roleIdsThatCanBeUsedThisEmojiAsReaction?: MiRole['id'][];
|
||||||
}, moderator?: MiUser): Promise<
|
}, moderator?: MiUser): Promise<
|
||||||
void
|
undefined
|
||||||
| 'NO_SUCH_EMOJI'
|
| 'NO_SUCH_EMOJI'
|
||||||
| 'SAME_NAME_EMOJI_EXISTS'
|
| 'SAME_NAME_EMOJI_EXISTS'
|
||||||
> {
|
> {
|
||||||
|
@ -171,6 +171,7 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
||||||
after: updated,
|
after: updated,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
|
|
|
@ -98,6 +98,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
case undefined: return;
|
case undefined: return;
|
||||||
case 'NO_SUCH_EMOJI': throw new ApiError(meta.errors.noSuchEmoji);
|
case 'NO_SUCH_EMOJI': throw new ApiError(meta.errors.noSuchEmoji);
|
||||||
case 'SAME_NAME_EMOJI_EXISTS': throw new ApiError(meta.errors.sameNameEmojiExists);
|
case 'SAME_NAME_EMOJI_EXISTS': throw new ApiError(meta.errors.sameNameEmojiExists);
|
||||||
|
// 網羅性チェック
|
||||||
|
default: const mustBeNever: never = error;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue