Type reference (allowed for classOf[], is/asInstanceOf[]).
A TypeRef has exactly the same level of precision as a JVM type.
There is a one-to-one relationship between a TypeRef and an instance of
java.lang.Class at run-time. This means that:
All primitive types have their TypeRef (including scala.Byte and
scala.Short), and they are different from their boxed versions.
Raw JS types are not erased to any
Array types are like on the JVM
A TypeRef therefore uniquely identifies a classOf[T]. It is also the
type refs that are used in method signatures, and which therefore dictate
JVM/IR overloading.
Type reference (allowed for classOf[], is/asInstanceOf[]).
A
TypeRefhas exactly the same level of precision as a JVM type. There is a one-to-one relationship between aTypeRefand an instance ofjava.lang.Classat run-time. This means that:TypeRef(includingscala.Byteandscala.Short), and they are different from their boxed versions.anyA
TypeReftherefore uniquely identifies aclassOf[T]. It is also the type refs that are used in method signatures, and which therefore dictate JVM/IR overloading.