I am using a enum type as key for an object:
enum Level {
Novice, Intermediate, Pro
}
type Players = { [key in Level] : string[]}
Upon trying to create an object of type players with just Novice and Pro, I get the error saying Intermediate is not present:
const mapping: Players = {
[Level.Novice]: ["Neo"],
[Level.Pro]: ["John Wick"]
}
How do I make it work?