What is the Operator Precedence of Await?

An AwaitExpression is a UnaryExpression and has the same precedence as delete, void, typeof, +, -, ~, and !, binding stronger than any binary operator.

This is unlike yield which has a precedence lower than anything else except the comma operator. This design decision was made because both yield a+b and await a + await b are scenarios thought to be more common than (yield a) + (yield b) and await (a + b).

Leave a Comment