diff options
| author | Jiří Cihelka <36630605+jiricekcz@users.noreply.github.com> | 2024-07-22 15:37:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-22 13:37:13 +0000 |
| commit | b037c19ccb1133d8525c60f83786935271973f94 (patch) | |
| tree | c9b287d22c6cc1a9d4b9cfabd9bbc35ed1df68ac | |
| parent | bd72b95d9e8d5c05f5a7392dab00d9db34534565 (diff) | |
Explanation of void return in the functions documentation (#4590)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
| -rw-r--r-- | crates/typst/src/foundations/func.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/typst/src/foundations/func.rs b/crates/typst/src/foundations/func.rs index dc5ea8df..4cc4a6ba 100644 --- a/crates/typst/src/foundations/func.rs +++ b/crates/typst/src/foundations/func.rs @@ -81,6 +81,10 @@ pub use typst_macros::func; /// body evaluates to the result of joining all expressions preceding the /// `return`. /// +/// Functions that don't return any meaningful value return [`none`] instead. +/// The return type of such functions is not explicitly specified in the +/// documentation. (An example of this is [`array.push`]). +/// /// ```example /// #let alert(body, fill: red) = { /// set text(white) |
