order-loop-carries-nothing.ts 337 B

12345678910
  1. // A loop that repeats but carries NO data between rounds. The self-arrow must still
  2. // appear: it comes from the ordering between consecutive iterations (the `await` in
  3. // the body), not from the data.
  4. const poller = agent("poller");
  5. let seen = 0;
  6. while (seen < 5) {
  7. await poller.ask<string>("poll once");
  8. seen += 1;
  9. }
  10. return seen;