Array type.
Class (or interface) type.
Record type.
Record type. Used by the optimizer to inline classes as records with multiple fields. They are desugared as several local variables by JSDesugaring. Record types cannot cross method boundaries, so they cannot appear as the type of fields or parameters, nor as result types of methods. The compiler itself never generates record types.
Reference types (allowed for classOf[], is/asInstanceOf[]).
Type of an expression in the IR.
Any type (the top type of this type system).
Any type (the top type of this type system).
A variable of this type can contain any value, including undefined
and null
and any raw JS value. This type supports a very limited set
of Scala operations, the ones common to all values. Basically only
reference equality tests and instance tests. It also supports all
JavaScript operations, since all Scala objects are also genuine
JavaScript objects.
The type java.lang.Object in the back-end maps to AnyType because it
can hold raw JS values (not only instances of Scala.js classes).
Boolean type.
Boolean type.
It does not accept null
nor undefined
.
Double type (64-bit).
Double type (64-bit).
It does not accept null
nor undefined
.
Float type (32-bit).
Float type (32-bit).
It does not accept null
nor undefined
.
32-bit signed integer type.
32-bit signed integer type.
It does not accept null
nor undefined
.
64-bit signed integer type.
64-bit signed integer type.
It does not accept null
nor undefined
.
No type.
Nothing type (the bottom type of this type system).
Nothing type (the bottom type of this type system).
Expressions from which one can never come back are typed as Nothing.
For example, throw
and return
.
The type of null
.
The type of null
.
It does not accept undefined
.
The null type is a subtype of all class types and array types.
String type.
String type.
It does not accept null
nor undefined
.
The type of undefined
.
Tests whether a type lhs
is a subtype of rhs
(or equal).
Tests whether a type lhs
is a subtype of rhs
(or equal).
NoType is never a subtype or supertype of anything (including
itself). All other types are subtypes of themselves.
A function testing whether a class/interface is a subclass of another class/interface.
Generates a literal zero of the given type.