#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)
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
...```
You can choose specific lines to embed by selecting them before copying the link.