ClosureType
Closure type.
This is the type of a typed closure. Parameters and result are statically typed according to the closureTypeRef components.
Closure types may be nullable. Null() is a valid value of a nullable closure type. This is unfortunately required to have default values of closure types, which in turn is required to be used as the type of a field.
Closure types are non-variant in both parameter and result types.
Closure types are not subtypes of AnyType. That statically prevents them from going into JavaScript code or in any other universal context. They do not support type tests nor casts.
The following subtyping relationships hold for any closure type CT:
nothing <: CT <: void
For a nullable closure type CT, additionally the following subtyping relationship holds:
null <: CT
Attributes
- Graph
-
- Supertypes