Open DanielRosenwasser opened 4 weeks ago
See #58729 for details.
mystery(() => {});
would be quite mysterious if it can reassign x
without an assignment in the body of the callback. I assume this is a typo?
@DanielRosenwasser I just wanna say thank you and the team for publishing these design notes. I always learn something from them.
Control Flow Analysis From Callbacks
https://github.com/microsoft/TypeScript/issues/11498
mystery
might have been called.So what are the risks and open questions?
Should we make exceptions to
Promise.prototype.then
?What about
await
on those?Do we need to consider that each function's control flow needs to be dominated by prior arguments?
Example
We need to assume that
A_post
is a possible antecedent ofA_pre
andB_pre
, and thatB_post
is a possible antecedent ofA_pre
andB_pre
.