I have a situation I want to use await in a ternary operator. I want to set a value to either a literal value or the resolve value of a promise, depending on a condition. Hopefully the code below will help describe what I want to do, but I am pretty sure it is not correct so consider it pseudo code.
const val = checkCondition ? "literal value" : await promiseGetValue();
Where promiseGetValue() returns a promise which resolves to a literal value. What is the correct way to do this?