Closed
Description
TypeScript Version: 4.1.0-insiders.20201002 [nightly]
Search Terms: exponentiation exponential async await operator parser
Code
async function f() {
await 1 ** 1;
}
Expected behavior:
No error.
Actual behavior:
Error: "An unary expression with the 'await' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. (17006)"
Playground Link: Here
Related Issues: Couldn't find any.
Incidentally, the grammar in the error message is also wrong (or at least unusual) - it's normally "a" unary expression, not "an", in my experience, since most people pronounce it "yoon-ary" rather than "oon-ary".