type¶
meth (Arg₁: function):source
TBD
type type < function
Type of all types. Every type contains a set of named exports, which allows them to be used as modules.
fun type(Value: any): type
Returns the type of
Value
.meth (Type: type) :: (Name: string): any | error
Returns the value of
Name
exported fromType
. Returns an error ifName
is not present. This allows types to behave as modules.meth (Type₁: type) * (Type₂: type): type
Returns the closest common parent type of
Type₁
andType₂
.meth (Type₁: type) < (Type₂: type): type or nil
Returns
Type₂
ifType₂
is a strict parent ofType₁
, otherwise returnsnil
.meth (Type₁: type) <= (Type₂: type): type or nil
Returns
Type₂
ifType₂
is a parent ofType₁
, otherwise returnsnil
.meth (Type₁: type) > (Type₂: type): type or nil
Returns
Type₂
ifType₂
is a strict sub-type ofType₁
, otherwise returnsnil
.meth (Type₁: type) >= (Type₂: type): type or nil
Returns
Type₂
ifType₂
is a sub-type ofType₁
, otherwise returnsnil
.meth ?(Type: type): type
Returns a union interface of
Type
andtype(nil)
.meth (Base: type)[Type₁, : type, ...]: type
Returns the generic type
Base[Type₁, ..., Typeₙ]
.meth (Type: type):constructor: function
Returns the constructor for
Type
.meth (Type: type):exports: map
Returns a map of all the exports from
Type
.meth (Type: type):parents: list
Returns a list of the parent types of
Type
.meth (Type: type):rank: integer
Returns the rank of
Type
, i.e. the depth of its inheritence tree.meth (Type₁: type) | (Type₂: type): type
Returns a union interface of
Type₁
andType₂
.meth (Buffer: string::buffer):append(Value: type)
Appends a representation of
Value
toBuffer
.meth (Ref: weak::ref):get: any | nil
TBD
type weakref
TBD
fun weakref(Value: any): weakref
TBD