I encountered an issue in my TypeScript code:
error message: 'Type 'TransitionStyles' cannot be used as an index type.'
I'm wondering if there's a way to modify my interface so that it can be used as an index type
as well:
export interface TransitionStyles {
entering: Object
entered: Object
exiting: Object
exited: Object
[key: string]: Object
}
or do I need to switch to a different interface like this:
export type TransitionState = 'entering' | 'entered' | 'exiting' | 'exited'