Explanation of void return in the functions documentation (#4590)

Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
Jiří Cihelka 2024-07-22 15:37:13 +02:00 committed by GitHub
parent bd72b95d9e
commit b037c19ccb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)