Tests whether this object has the specified property as a direct property.
Tests whether this object has the specified property as a direct property.
Unlike js.Object.hasProperty, this method does not check down the object's prototype chain.
MDN
Tests whether this object is in the prototype chain of another object.
Tests whether this object is in the prototype chain of another object.
Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain.
Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain. If the object does not have the specified property, this method returns false.
MDN
Converts the Thenable into a Scala Future.
Converts the Thenable into a Scala Future.
Unlike when calling the then methods of Thenable, the resulting
Future is always properly typed, and
operations on it will be well-typed in turn.
(promise: StringAdd).self
(promise: StringFormat).self
(promise: ArrowAssoc[Promise[A]]).x
(Since version 2.10.0) Use leftOfArrow instead
(promise: Ensuring[Promise[A]]).x
(Since version 2.10.0) Use resultOfEnsuring instead
ECMAScript 6 Promise of an asynchronous result.
Attention! The nature of this class, from the ECMAScript specification, makes it inherently un-typeable, because it is not type parametric.
The signatures of the constructor and the methods
thenandcatchare only valid provided that the values ofAandBare not Thenables.We recommend to use Scala's
Futures instead ofPromiseas much as possible. APromisecan be converted to aFuturewith.toFutureand back with.toJSPromise(provided by JSConverters).With
import scala.scalajs.js.Thenable.Implicits._you can implicitly convert a
Promiseto aFuture, and therefore you can directly use the methods ofFutureonPromises.