@nevware21/ts-async - v0.6.1
    Preparing search index...

    Function setDisableFakeTimersDetection

    • Enables or disables this library's automatic detection of Sinon-style fake timers (a patched setTimeout exposing a .clock property). By default (and when this function has never been called, or has been called with undefined) detection remains active -- this is the existing / historical behavior, so any global that patches setTimeout and happens to also expose a .clock property (not necessarily Sinon) will still be treated as fake timers and change this library's internal scheduling (eg. using a 0ms timeout "hop" instead of a microtask when deferring a queued continuation). Passing true disables the detection so it always behaves as though fake timers are not present (real microtask / timer scheduling is always used), which avoids that false-positive fingerprinting risk for consumers who don't rely on it. Passing false re-enables detection.

      Parameters

      • Optionaldisable: boolean

        When true (or any other truthy value), disables fake timer detection so _isFakeTimersEnabled always returns false. When false (or any other falsy value), (re-)enables detection. When undefined, restores the default (detection enabled).

      Returns void

      0.7.0

      // Disable fake timer detection -- this library will never treat a patched
      // setTimeout.clock as an indication that fake timers are active
      setDisableFakeTimersDetection(true);

      // Re-enable detection
      setDisableFakeTimersDetection(false);

      // Restore the default (detection enabled)
      setDisableFakeTimersDetection();