From 05065d72395ce41aa240416b222d5a39af26eaba Mon Sep 17 00:00:00 2001 From: Arjun Ramesh <90422058+arjunr2@users.noreply.github.com> Date: Wed, 2 Jul 2025 09:52:35 -0700 Subject: [PATCH] Fix multi-value function return documentation --- component-model/src/design/wit.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component-model/src/design/wit.md b/component-model/src/design/wit.md index 9315c03a..0424d494 100644 --- a/component-model/src/design/wit.md +++ b/component-model/src/design/wit.md @@ -298,10 +298,10 @@ add: func(a: u64, b: u64) -> u64; lookup: func(store: kv-store, key: string) -> option; ``` -A function can have multiple return values. In this case the return values must be named, similar to the parameter list. All return values must be populated (in the same way as tuple or record fields). +For multi-value returns from a function, you can use a [tuple](#tuple) or [record](#record). ```wit -get-customers-paged: func(cont: continuation-token) -> (customers: list, cont: continuation-token); +get-customers-paged: func(cont: continuation-token) -> tuple, continuation-token>; ``` A function can be declared as part of an [interface](#interfaces), or can be declared as an import or export in a [world](#worlds).