AnyType

dotty.tools.sjs.ir.Types.AnyType
case object AnyType extends Type

Any type.

This is the supertype of all value types that can be passed to JavaScript code. Record types are the canonical counter-example: they are not subtypes of any because their values cannot be given to JavaScript.

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 values.

The type java.lang.Object in the back-end maps to AnyType because it can hold JS values (not only instances of Scala.js classes).

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Type
class Object
trait Matchable
class Any
Show all
Self type
AnyType.type

Members list

Type members

Inherited types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton

Attributes

Inherited from:
Singleton
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton

Inherited and Abstract types

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

A type that accepts the same values as this type except null, unless this type is VoidType.

A type that accepts the same values as this type except null, unless this type is VoidType.

If this is VoidType, returns this type.

For all other types tpe, tpe.toNonNullable.isNullable is false.

Attributes

Inherited methods

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton

Is null an admissible value of this type?

Is null an admissible value of this type?

Attributes

Inherited from:
Type

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def show(): String

Attributes

Inherited from:
Type