Node TAP
    Preparing search index...

    A Timer that lives in the mock clock

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • clock: Clock
      • w: number
      • f: (...a: any[]) => any

      Returns Timer

    Properties

    _onTimeout: null | ((...a: any[]) => any)

    use the property name _onTimeout so that the global clearTimeout method in Node will make it no-op if it gets passed there.

    clock: Clock

    Clock governing this timer

    reffed: boolean

    set by Timer#unref

    These timers don't keep the event loop open anyway, so this doesn't do much, but it's useful when testing to ensure that a timeout had .ref() or .unref() called on it.

    w: number

    When this timer should fire

    Methods

    • Remove this timer from the clock's queue.

      Returns void

    • simulacrum of node's Timer.ref. Just sets the Timer#ref field.

      Returns void

    • simulacrum of node's Timer.unref. Just sets the Timer#ref field.

      Returns void