class Promise[T] extends scala.scalajs.js.Object with StObject with std.Promise[T]

Annotations
@JSType() @JSGlobal("Promise") @native()
Source
Promise.scala
Linear Supertypes
std.Promise[T], StObject, scala.scalajs.js.Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Promise
  2. Promise
  3. StObject
  4. Object
  5. Any
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Promise(executor: Function2[Function1[|[T, Thenable[T]], Unit], Function1[UndefOr[Any], Unit], Unit])

    Creates a new Promise.

    Creates a new Promise.

    executor

    A callback used to initialize the promise. This callback is passed two arguments: a resolve callback used to resolve the promise with a value or the result of another promise, and a reject callback used to reject the promise with a provided reason or error.

  2. new Promise()
    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): scala.Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): scala.Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def catch[TResult](onrejected: Function1[Any, |[TResult, Thenable[TResult]]]): scala.scalajs.js.Promise[|[T, TResult]]
    Definition Classes
    Promise
  6. def catch[TResult](): scala.scalajs.js.Promise[|[T, TResult]]

    Attaches a callback for only the rejection of the Promise.

    Attaches a callback for only the rejection of the Promise.

    Definition Classes
    Promise
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  8. final def eq(arg0: AnyRef): scala.Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): scala.Boolean
    Definition Classes
    AnyRef → Any
  10. def finally(onfinally: Function0[Unit]): scala.scalajs.js.Promise[T]
    Definition Classes
    Promise
  11. def finally(): scala.scalajs.js.Promise[T]

    Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected).

    Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

    Definition Classes
    Promise
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. def hasOwnProperty(v: scala.Predef.String): scala.Boolean
    Definition Classes
    Object
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  15. final def isInstanceOf[T0]: scala.Boolean
    Definition Classes
    Any
  16. def isPrototypeOf(v: scala.scalajs.js.Object): scala.Boolean
    Definition Classes
    Object
  17. final def ne(arg0: AnyRef): scala.Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  20. def propertyIsEnumerable(v: scala.Predef.String): scala.Boolean
    Definition Classes
    Object
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def then[TResult1, TResult2](onfulfilled: Unit, onrejected: Function1[Any, |[TResult2, Thenable[TResult2]]]): scala.scalajs.js.Promise[|[TResult1, TResult2]]
    Definition Classes
    Promise
  23. def then[TResult1, TResult2](onfulfilled: Null, onrejected: Function1[Any, |[TResult2, Thenable[TResult2]]]): scala.scalajs.js.Promise[|[TResult1, TResult2]]
    Definition Classes
    Promise
  24. def then[TResult1, TResult2](onfulfilled: Function1[T, |[TResult1, Thenable[TResult1]]], onrejected: Function1[Any, |[TResult2, Thenable[TResult2]]]): scala.scalajs.js.Promise[|[TResult1, TResult2]]
    Definition Classes
    Promise
  25. def then[TResult1, TResult2](onfulfilled: Function1[T, |[TResult1, Thenable[TResult1]]]): scala.scalajs.js.Promise[|[TResult1, TResult2]]
    Definition Classes
    Promise
  26. def then[TResult1, TResult2](): scala.scalajs.js.Promise[|[TResult1, TResult2]]

    Attaches callbacks for the resolution and/or rejection of the Promise.

    Attaches callbacks for the resolution and/or rejection of the Promise.

    Definition Classes
    Promise
  27. def toLocaleString(): scala.Predef.String
    Definition Classes
    Object
  28. def toString(): java.lang.String
    Definition Classes
    AnyRef → Any
  29. val toStringTag: java.lang.String
    Definition Classes
    Promise
    Annotations
    @JSName(js.Symbol.toStringTag)
  30. def valueOf(): Any
    Definition Classes
    Object
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from std.Promise[T]

Inherited from StObject

Inherited from scala.scalajs.js.Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped