The thing I'm struggling with is the way to specify the allowed values for a property in TypeScript.
I have this interface that has the said property statically typed:
interface SomeInterface{
prop: "bell" | "edit" | "log-out"
}
But I would need something like this:
const list = ["bell", "edit", "log-out"]
interface SomeInterface{
prop: list(allowed are all values from list)
}
Here the list of allowed values is changing dynamically.
FYI it is my first time asking on stackoverflow. Thanks!