Represents a composite of cancelable references that are stacked, so you can push a new reference, or pop an existing one and when it gets canceled, then the whole stack gets canceled.
The references are pushed and popped in a FIFO order.
Used in the implementation of
Removes a cancelable reference from the stack in FIFO order.
the cancelable reference that was removed.
Pushes a cancelable reference on the stack, to be popped or cancelled later in FIFO order.
Returns a StackedCancelable that's initialized with the given list of cancelable references.
const list = StackedCancelable.collection( Cancelable.of(() => console.log("Cancelled #1")), Cancelable.of(() => console.log("Cancelled #2")), Cancelable.of(() => console.log("Cancelled #3")) ) // Popping cancelable no. 3 from the stack list.pop() list.cancel() //=> Cancelled #1 //=> Cancelled #2
is the array of references to cancel when cancellation is triggered
Generated using TypeDoc