class Promise[T] extends scala.scalajs.js.Object with StObject with std.Promise[T]
- Annotations
- @JSType() @JSGlobal("Promise") @native()
- Source
- Promise.scala
- Alphabetic
- By Inheritance
- Promise
- Promise
- StObject
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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.
- new Promise()
- Attributes
- protected
Value Members
- final def !=(arg0: Any): scala.Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): scala.Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def catch[TResult](onrejected: Function1[Any, |[TResult, Thenable[TResult]]]): scala.scalajs.js.Promise[|[T, TResult]]
- Definition Classes
- Promise
- 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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef → Any
- def finally(onfinally: Function0[Unit]): scala.scalajs.js.Promise[T]
- Definition Classes
- Promise
- 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hasOwnProperty(v: scala.Predef.String): scala.Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: scala.Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: scala.scalajs.js.Object): scala.Boolean
- Definition Classes
- Object
- final def ne(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def propertyIsEnumerable(v: scala.Predef.String): scala.Boolean
- Definition Classes
- Object
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def then[TResult1, TResult2](onfulfilled: Unit, onrejected: Function1[Any, |[TResult2, Thenable[TResult2]]]): scala.scalajs.js.Promise[|[TResult1, TResult2]]
- Definition Classes
- Promise
- def then[TResult1, TResult2](onfulfilled: Null, onrejected: Function1[Any, |[TResult2, Thenable[TResult2]]]): scala.scalajs.js.Promise[|[TResult1, TResult2]]
- Definition Classes
- Promise
- 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
- def then[TResult1, TResult2](onfulfilled: Function1[T, |[TResult1, Thenable[TResult1]]]): scala.scalajs.js.Promise[|[TResult1, TResult2]]
- Definition Classes
- Promise
- 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
- def toLocaleString(): scala.Predef.String
- Definition Classes
- Object
- def toString(): java.lang.String
- Definition Classes
- AnyRef → Any
- val toStringTag: java.lang.String
- Definition Classes
- Promise
- Annotations
- @JSName(js.Symbol.toStringTag)
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated