unary-operand-facade-call.ts 465 B

12345678
  1. // A facade call inside a void/typeof/delete operand must still be evaluated (the operand
  2. // runs at runtime). Fire-and-forget `void` idiom shown; typeof/delete share the gap and
  3. // the same fix (they are distinct AST node kinds, not PrefixUnaryExpression).
  4. // Expected: source -> ask#1, ask#1 -> ask#2 (seed into b's ask), ask#1 -> sink (return seed).
  5. const seed = await agent("a").ask<string>("seed");
  6. const b = agent("b");
  7. void b.ask<string>(seed);
  8. return seed;