Skip to content

KeyTypeItem

A keyed item, such as name: T, ?name: T or *(K): V.

Inherits from: TypeItem

Fields

key @ Span [get]

The span of the key as written. A bareword key is a symbol; any other key is a type, such as a quoted string or a parenthesized name.

key_ty @ (TypeExpr | nil) [get]

The type giving the key, or nil for a bareword symbol.

quant @ (Sym | nil) [get]

How many of the element the item admits, or nil for exactly one, as for PosTypeItem.quant.

ty @ TypeExpr [get]

The item's type.