I have conversation data where some key names contain values of other keys. Is it possible to explicitly create a type for this without using [key: string]?
The data looks like this, using the two uids in the next two "new" keys:
{
uid0: "212122323",
uid1: "797789667",
new212122323: true,
new797789667: false
}
I'm hoping to get a type like this (pseudotype):
export type Conversation = {
uid0: string,
uid1: string,
["new"+this.uid0]: boolean,
["new"+this.uid1]: boolean,
}
[key: string]: string | booleanalong withuid0anduid1.