make message identifiers actually work properly with LSP

This commit is contained in:
kenobi 2023-11-19 18:55:51 +01:00
parent fce9091114
commit 1348abbd48
1 changed files with 3 additions and 3 deletions

View File

@ -2,9 +2,9 @@ import { Message } from "discord.js";
// branded types to differentiate objects of identical Type but different contents // branded types to differentiate objects of identical Type but different contents
export type VoteEndMessage = Message & { readonly __brand: 'voteend' } export type VoteEndMessage = Message<true> & { readonly __brand: 'voteend' }
export type AnnouncementMessage = Message & { readonly __brand: 'announcement' } export type AnnouncementMessage = Message<true> & { readonly __brand: 'announcement' }
export type VoteMessage = Message & { readonly __brand: 'vote' } export type VoteMessage = Message<true> & { readonly __brand: 'vote' }
export type KnownDiscordMessage = VoteMessage | VoteEndMessage | AnnouncementMessage export type KnownDiscordMessage = VoteMessage | VoteEndMessage | AnnouncementMessage