I cannot evaluate a property inline in a nested dictionary. If I evaluate the property into a separate local variable, it works. Why is that?
This throws an error
const appConfig = {
config.networks!.testnet?.chainId! : {
"token1": "mytoken"
}
};
This works
const chainId = config.networks!.testnet?.chainId!;
const appConfig = {
chainId : {
"token1": "mytoken"
}
};