Foundations
Foundational types and functions.
Here, you'll find documentation for basic data types like integers and strings as well as details about core computational functions.
Definitions
| Name | Description |
|---|---|
arguments |
Captured arguments to a function. |
array |
A sequence of values. |
assert |
Ensures that a condition is fulfilled. |
auto |
A value that indicates a smart default. |
bool |
A type with two states. |
bytes |
A sequence of bytes. |
calc |
Module for calculations and processing of numeric values. |
content |
A piece of document content. |
datetime |
Represents a date, a time, or a combination of both. |
decimal |
A fixed-point decimal number type. |
dictionary |
A map from string keys to values. |
duration |
Represents a positive or negative span of time. |
eval |
Evaluates a string as Typst code. |
float |
A floating-point number. |
function |
A mapping from argument values to a return value. |
int |
A whole number. |
label |
A label for an element. |
module |
A collection of variables and functions that are commonly related to a single theme. |
none |
A value that indicates the absence of any other value. |
panic |
Fails with an error. |
plugin |
Loads a WebAssembly module. |
regex |
A regular expression. |
repr |
Returns the string representation of a value. |
selector |
A filter for selecting elements within the document. |
std |
A module that contains all globally accessible items. |
str |
A sequence of Unicode codepoints. |
symbol |
A Unicode symbol. |
sys |
Module for system interactions. |
target |
Returns the current export target. |
type |
Describes a kind of value. |
version |
A version with an arbitrary number of components. |