trait
Any extends AnyRef
Value Members
-
-
final
def
##(): Int
-
def
+(other: String): String
-
def
->[B](y: B): (Any, B)
-
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
def
ensuring(cond: (Any) ⇒ Boolean): Any
-
-
def
ensuring(cond: Boolean): Any
-
-
-
def
finalize(): Unit
-
def
formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
→[B](y: B): (Any, B)
Inherited by implicit conversion any2stringadd from
Any to any2stringadd[Any]
Inherited by implicit conversion StringFormat from
Any to StringFormat[Any]
Inherited by implicit conversion Ensuring from
Any to Ensuring[Any]
Inherited by implicit conversion ArrowAssoc from
Any to ArrowAssoc[Any]
Root of the hierarchy of JavaScript types.
Subtypes of js.Any are JavaScript types, which have different semantics and guarantees than Scala types (subtypes of AnyRef and AnyVal). Operations on JavaScript types behave as the corresponding operations in the JavaScript language.
You can implement JavaScript types in Scala.js. The implementation (i.e., the method and constructor bodies) will follow Scala semantics, but the constructor and methods will be called using JavaScript semantics (e.g., runtime dispatch).
A JavaScript type that is annotated with @js.native is a facade type to APIs implemented in JavaScript code. Its implementation is irrelevant and never emitted. As such, all members must be defined with their right-hand-side being js.native. Further, native JavaScript types must be annotated with one of @JSGlobal, @JSImport, @JSGlobalScope to specify where to fetch it from.
In most cases, you should not directly extend this trait, but rather extend js.Object.
It is not possible to define traits or classes that inherit both from this trait and a strict subtype of AnyRef. In fact, you should think of js.Any as a third direct subclass of scala.Any, besides scala.AnyRef and scala.AnyVal.
See the JavaScript interoperability guide of Scala.js for more details.