Angular Signal Generators
    Preparing search index...

    Interface TimerSignalOptions<T>

    Options for timerSignal.

    interface TimerSignalOptions<T = number> {
        debugName?: string;
        injector?: Injector;
        missedTickBehavior?: MissedTickBehavior;
        selector?: (tickCount: number) => T;
        stopped?: boolean;
    }

    Type Parameters

    • T = number

    Hierarchy

    • Pick<CreateSignalOptions<T>, "debugName">
      • TimerSignalOptions
    Index
    debugName?: string

    A debug name for the signal. Used in Angular DevTools to identify the signal.

    injector?: Injector

    pass injector if this is not created in Injection Context

    missedTickBehavior?: MissedTickBehavior

    Determines how ticks missed while the host could not run callbacks affect the tick count. discard counts only the callback that is delivered. coalesce advances the count to its logical position on the interval timeline while still delivering only one callback.

    'discard'
    
    selector?: (tickCount: number) => T

    A selector function that receives the tick count and returns the value to emit from the signal. If not provided, the tick count (number) is emitted.

    stopped?: boolean

    If true, the timer isn't running at start. When running in a non-browser environment, the signal always begins in a stopped state by default.