annotations-design-patterns
    Preparing search index...

    Function observeOperation

    • Measures the outcome visible to this operator layer with a monotonic clock. A contextual pre-abort is measured as cancellation; run() may short-circuit before entering an operator when its signal was already aborted, in which case no layer ran.

      Native promises retain their identity when there is no signal. Generic thenables are assimilated once and returned as a promise so observation cannot trigger a second invocation of a stateful then method. Cancellation measures this waiter's outcome, not necessarily completion of shared physical work. A hostile Promise subclass whose species throws may prevent attaching an observer; the original business promise is still returned unchanged.

      Type Parameters

      • This = unknown
      • Args extends readonly unknown[] = readonly unknown[]
      • Result = unknown

      Parameters

      Returns Operator<This, Args, Result, Result>