Module ty

Source
Expand description

Types and type operations for Typst.

Structs§

ApplySigChecker
A checker for applying a signature to a type.
BoundCheckContext
A context for checking the bounds of a type.
BoundPred
A predicate for checking the bounds of a type.
DynTypeBounds
The state of a type variable (bounds of some type in program).
IfTy
A conditional type. if t1 then t2 else t3
IfaceCheckContext
A context to check the interface of a type.
IfaceCheckDriver
A driver to check the interface of a type.
InsTy
An instance of a typst type.
NameBone
An ordered list of names.
PackageId
A package identifier.
ParamAttrs
Describes a function parameter attribute.
ParamTy
Describes a parameter type.
PathKindIter
An iterator over the variants of PathKind
RecordTy
A record type.
SelectKeyChecker
A checker to check the select of a type.
SelectTy
A field selection type.
SigCheckContext
A context to check a signature.
SigCheckDriver
A driver to check a signature.
SigShape
A shape of a signature.
SigTy
A typst function type.
SigWithTy
A type with partially applied arguments.
TypeBinary
A binary operation type.
TypeBounds
A frozen type variable (bounds of some type in program). t :> t1 | ... | tn <: f1 & ... & fn lbs------------- ubs-------------
TypeInfo
The type information on a group of syntax structures (typing).
TypeSource
The syntax source (definition) of a type node. todo: whether we should store them in the type node
TypeUnary
A unary operation type.
TypeVar
A type variable.
TypeVarBounds
A type variable bounds.

Enums§

BuiltinSig
A builtin signature.
BuiltinTy
A builtin type.
DocSource
A source of documentation.
FlowVarKind
A type variable bounds.
Iface
A type that represents the interface of a type.
PathKind
A kind of path recognized by the analyzer.
Sig
A signature.
SigSurfaceKind
A kind of signature surface.
Ty
All possible types in tinymist.
TypeSigParam
A function parameter type.

Statics§

FLOW_INSET_DICT
The record component of an inset type.
FLOW_MARGIN_DICT
The record component of a margin type.
FLOW_OUTSET_DICT
The record component of an outset type.
FLOW_RADIUS_DICT
The record component of a radius type.
FLOW_STROKE_DICT
The record component of a stroke type.
FLOW_TEXT_FONT_DICT
The record component of a text font type.

Traits§

ApplyChecker
A trait for checking the application of a signature.
BoundChecker
A trait for checking the bounds of a type.
IfaceChecker
A trait to check the interface of a type.
SelectChecker
A trait to check the select of a type.
SigChecker
A trait to check a signature.
TyCtx
A type context.
TyCtxMut
A mutable type context.
TyMutator
A trait to mutate a type.
TypeInterface
A common type kinds for those types that has fields (abstracted record type).
TypeInterfaceExt
Extension common methods for TypeInterface.

Functions§

is_plain_value
Checks if a value is a plain value.
term_value
Gets the type of a value.
term_value_rec
Gets the type of a value recursively.

Type Aliases§

ArgsTy
A function argument type.
BinaryOp
The kind of binary operation.
PatternTy
A pattern type.

Derive Macros§

BindTyCtx
Derives the BindTyCtx trait.