Type Alias: IntervalOptions
IntervalOptions =
object
Defined in: packages/rx/src/IntervalSubject.ts:4
Properties
autoStart?
optionalautoStart?:boolean
Defined in: packages/rx/src/IntervalSubject.ts:6
Whether to start the timer immediately. Default: false
delay?
optionaldelay?:number
Defined in: packages/rx/src/IntervalSubject.ts:9
Interval duration in milliseconds. Default: 1000
ensureIncrement?
optionalensureIncrement?:boolean
Defined in: packages/rx/src/IntervalSubject.ts:23
When true, derive each emitted value from the elapsed time since the interval started, rather than incrementing from the most recently emitted value.
This keeps the value aligned with the number of intervals expected to have elapsed if timer callbacks are delayed. Missed increments may be applied in a single update; callbacks are not replayed for each missed interval.
This is useful when the browser or device throttles timeouts/intervals.
Default: true
incrementBy?
optionalincrementBy?:number
Defined in: packages/rx/src/IntervalSubject.ts:29
Number to increment the counter by. Default: 1
initialValue?
optionalinitialValue?:number
Defined in: packages/rx/src/IntervalSubject.ts:26
Initial counter value. Default: 0
pauseIf?
optionalpauseIf?: (this,currentValue,nextValue) =>boolean
Defined in: packages/rx/src/IntervalSubject.ts:38
Optional, callback invoked before every interval to determine whether timer should pause or continue running.
If returns true, the counter will pause but the counter will remain unchanged.
Default: undefined
Parameters
this
currentValue
number
nextValue
number
Returns
boolean
stopIf?
optionalstopIf?: (this,currentValue,nextValue) =>boolean
Defined in: packages/rx/src/IntervalSubject.ts:51
Optional, callback invoked before every interval to determine whether timer should stop or continue running.
If returns true, the counter will stop and reset to 0.
Default: undefined
Parameters
this
currentValue
number
nextValue
number
Returns
boolean