VirtualAction
class
stable
class VirtualAction<T> extends AsyncAction { constructor(scheduler: VirtualTimeScheduler, work: (this: SchedulerAction<T>, state?: T) => void, index: number = (scheduler.index += 1)) protected active: boolean protected scheduler: VirtualTimeScheduler protected work: (this: SchedulerAction<T>, state?: T) => void protected index: number schedule(state?: T, delay: number = 0): Subscription protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): any protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): any protected _execute(state: T, delay: number): any }
Constructor
constructor(scheduler: VirtualTimeScheduler, work: (this: SchedulerAction<T>, state?: T) => void, index: number = (scheduler.index += 1))
Parameters
scheduler | Type: |
work | Type: |
index | Optional. Default is Type: |
Properties
Property | Type | Description |
---|---|---|
active
| boolean | |
scheduler
| VirtualTimeScheduler | Declared in constructor. |
work
| (this: SchedulerAction<T>, state?: T) => void | Declared in constructor. |
index
| number | Declared in constructor. |
Methods
schedule(state?: T, delay: number = 0): Subscription
Parameters
state | Optional. Default is Type: |
delay | Optional. Default is Type: |
Returns
Subscription
protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): any
Parameters
scheduler | Type: |
id | Optional. Default is Type: |
delay | Optional. Default is Type: |
Returns
any
protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): any
Parameters
scheduler | Type: |
id | Optional. Default is Type: |
delay | Optional. Default is Type: |
Returns
any
protected _execute(state: T, delay: number): any
Parameters
state | Type: |
delay | Type: |
Returns
any
© 2015–2021 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors.
Code licensed under an Apache-2.0 License. Documentation licensed under CC BY 4.0.
https://rxjs.dev/api/index/class/VirtualAction