mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Explanation of void return in the functions documentation (#4590)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
parent
bd72b95d9e
commit
b037c19ccb
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user