Hey all I'm trying to dynamically set a style interface to a type like this:
type IListStyles = { [LIST_TYPE.ADD_ACTIONABLE]: IListItemAddActionableStyle; [LIST_TYPE.SUPERVALUE]: IListItemSupervalueStyle;}enum LIST_TYPE { ADD_ACTIONABLE = "ADD_ACTIONABLE", SUPERVALUE = "SUPERVALUE",}export interface IListItem<T extends LIST_TYPE> { style?: IListStyles[T]; type: T;
Buuut I'm getting that T can't be used to index IListStyles
has anyone done something like this before?