I have an enum and i need to define interface for the state using the enum as a key and object as a value: How can I describe the enum a key type
export enum Language {
CS,
EN
}
const [userInput, setUserInput] = useState<IUserInput>({
[Language.EN]: {
title: '',
price: '',
additional_info: '',
content: ''
},
interface IUserInput {
// ?
}
IUserInputto contain properties with key's of typeLanguageand values ofObject?