#hi, i'd need small help with proper type indication based on "customId" of an object if that's possi

3 messages · Page 1 of 1 (latest)

kindred sable
#

one sec, will make this in playground

sleek mossBOT
#
The Digital#3999

Preview:```ts
declare enum ComponentType {
ActionRow = 1,
Button = 2,
StringSelect = 3,
TextInput = 4,
UserSelect = 5,
RoleSelect = 6,
MentionableSelect = 7,
ChannelSelect = 8,
}

type ComponentTypeById<
T extends Record<string, ComponentType>

= {
[K in keyof T]: T[K] extends ComponentType
? K
: never
...```