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 from Type. Returns an error if Name is not present. This allows types to behave as modules.

meth (Type₁: type) * (Type₂: type): type

Returns the closest common parent type of Type₁ and Type₂.

meth (Type₁: type) < (Type₂: type): type or nil

Returns Type₂ if Type₂ is a strict parent of Type₁, otherwise returns nil.

meth (Type₁: type) <= (Type₂: type): type or nil

Returns Type₂ if Type₂ is a parent of Type₁, otherwise returns nil.

meth (Type₁: type) > (Type₂: type): type or nil

Returns Type₂ if Type₂ is a strict sub-type of Type₁, otherwise returns nil.

meth (Type₁: type) >= (Type₂: type): type or nil

Returns Type₂ if Type₂ is a sub-type of Type₁, otherwise returns nil.

meth ?(Type: type): type

Returns a union interface of Type and type(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):name: string

Returns the name of 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₁ and Type₂.

meth (Type₁: type) | (Type₂: type::union): type

Returns a union interface of Type₁ and Type₂.

meth (Buffer: string::buffer):append(Value: type)

Appends a representation of Value to Buffer.

meth ?(Type: type::union): type

Returns a union interface of Type₁ and Type₂.

meth (Type₁: type::union) | (Type₂: type): type

Returns a union interface of Type₁ and Type₂.

meth (Ref: weak::ref):get: any | nil

TBD

type weakref

TBD

fun weakref(Value: any): weakref

TBD