Options
All
  • Public
  • Public/Protected
  • All
Menu

AssignCancelable is an IAssignCancelable class providing useful builders for cancelable references that can be assigned.

Hierarchy

  • AssignCancelable

Implements

Index

Methods

Abstract cancel

  • cancel(): void

Abstract isCanceled

  • isCanceled(): boolean

Abstract update

Static alreadyCanceled

  • Returns an AssignCancelable reference that is already canceled.

    const ref = AssignCancelable.alreadyCanceled()
    ref.isCanceled() //=> true
    
    const c = BooleanCancelable.empty()
    ref.update(c) // cancels c
    c.isCanceled() // true
    

    The implementation returns the same reusable reference.

    Returns AssignCancelable

Static empty

Static of

  • Initiates an AssignCancelable reference and assigns it a reference that wraps the given cb callback.

    So this code:

    AssignCancelable.of(() => console.log("cancelled"))
    

    Is equivalent to this:

    const ref = AssignCancelable.empty()
    ref.update(Cancelable.of(() => console.log("cancelled")))
    

    Parameters

    • cb: function
        • (): void
        • Returns void

    Returns AssignCancelable

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc