Attributes
- Companion
- class
- Source
- TypeRef.scala
- Graph
-
- Supertypes
- Self type
-
TypeRef.type
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The name of the type.
Value members
Concrete methods
Wraps a TypeRef in Chunk, representing a high-performance immutable sequence.
Wraps a TypeRef in Chunk, representing a high-performance immutable sequence.
Value parameters
- typeRef
-
The element type
Attributes
- Returns
-
A TypeRef representing Chunk[typeRef]
- Example
-
val chunkOfLongs = TypeRef.chunk(TypeRef.Long) // Creates: Chunk[Long] - Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Creates an intersection type reference (Scala 3 A & B).
Creates an intersection type reference (Scala 3 A & B).
Value parameters
- types
-
The types in the intersection
Attributes
- Returns
-
A TypeRef representing the intersection of the given types
- Example
-
val named = TypeRef.intersection(TypeRef("HasName"), TypeRef("HasId")) // Represents: HasName & HasId - Source
- TypeRef.scala
Wraps a TypeRef in List, representing a list of elements.
Wraps a TypeRef in List, representing a list of elements.
Value parameters
- typeRef
-
The element type
Attributes
- Returns
-
A TypeRef representing List[typeRef]
- Example
-
val listOfInt = TypeRef.list(TypeRef.Int) // Creates: List[Int] - Source
- TypeRef.scala
Creates a TypeRef representing a Map with key and value types.
Creates a TypeRef representing a Map with key and value types.
Value parameters
- key
-
The key type
- value
-
The value type
Attributes
- Returns
-
A TypeRef representing Map[key, value]
- Example
-
val mapStringInt = TypeRef.map(TypeRef.String, TypeRef.Int) // Creates: Map[String, Int] - Source
- TypeRef.scala
Creates a TypeRef with the given name and type arguments.
Creates a TypeRef with the given name and type arguments.
Value parameters
- args
-
Type arguments (variable arguments)
- name
-
The name of the type
Attributes
- Returns
-
A TypeRef with the given name and arguments
- Example
-
val either = TypeRef.of("Either", TypeRef.String, TypeRef.Int) val list = TypeRef.of("List", TypeRef.String) - Source
- TypeRef.scala
Wraps a TypeRef in Option, representing an optional type.
Wraps a TypeRef in Option, representing an optional type.
Value parameters
- typeRef
-
The type to wrap
Attributes
- Returns
-
A TypeRef representing Option[typeRef]
- Example
-
val optString = TypeRef.optional(TypeRef.String) // Creates: Option[String] - Source
- TypeRef.scala
Wraps a TypeRef in Set, representing a set of unique elements.
Wraps a TypeRef in Set, representing a set of unique elements.
Value parameters
- typeRef
-
The element type
Attributes
- Returns
-
A TypeRef representing Set[typeRef]
- Example
-
val setOfStrings = TypeRef.set(TypeRef.String) // Creates: Set[String] - Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Creates a union type reference (Scala 3 A | B).
Creates a union type reference (Scala 3 A | B).
Value parameters
- types
-
The types in the union
Attributes
- Returns
-
A TypeRef representing the union of the given types
- Example
-
val strOrInt = TypeRef.union(TypeRef.String, TypeRef.Int) // Represents: String | Int - Source
- TypeRef.scala
Concrete fields
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala
Attributes
- Source
- TypeRef.scala