class-static-block-ask.ts 444 B

1234567891011
  1. // A facade call inside a static block runs at class initialization. Static and instance
  2. // members conflate into one abstract instance, so the static field read connects a -> b.
  3. // Expected: source -> ask#1, ask#1 -> ask#2, ask#2 -> sink.
  4. const seed = await agent("a").ask<string>("seed");
  5. class Registry {
  6. static value: Node<string>;
  7. static {
  8. this.value = agent("b").ask<string>(`process ${seed}`);
  9. }
  10. }
  11. return await Registry.value;