I am simplifying the question here .
interface Identity{
name: string;
}
Another generic interface
interface State<T extends Identity>{
[T.name] : StateContainer<T>
}
But this wont work as it gives error
Cannot find T
If I try to generate it by keeping it inside a function
function generate(c : Identity){
interface State<T>{
[c.name]: StateContainer<T>
}
}
It says
A computed property name in an interface must directly refer to built-in symbol.
My desired output is to have dynamic interface such that . State<Tenant>
should behave
interface State{
'tenant': ....
}