From b037c19ccb1133d8525c60f83786935271973f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Cihelka?= <36630605+jiricekcz@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:37:13 +0200 Subject: [PATCH] Explanation of void return in the functions documentation (#4590) Co-authored-by: Laurenz --- crates/typst/src/foundations/func.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/typst/src/foundations/func.rs b/crates/typst/src/foundations/func.rs index dc5ea8dfc..4cc4a6bab 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)