From e20eb77a4ef3e0c32c081be7190cb861400c37ff Mon Sep 17 00:00:00 2001 From: Ruslan Makarov Date: Mon, 16 Sep 2024 11:16:29 +0300 Subject: [PATCH] docs: missed return value type for useModel() (#3005) --- src/api/composition-api-helpers.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/api/composition-api-helpers.md b/src/api/composition-api-helpers.md index d09391857d..47ba1afc2a 100644 --- a/src/api/composition-api-helpers.md +++ b/src/api/composition-api-helpers.md @@ -35,12 +35,17 @@ This is the underlying helper that powers [`defineModel()`](/api/sfc-script-setu props: Record, key: string, options?: DefineModelOptions - ) + ): ModelRef type DefineModelOptions = { get?: (v: T) => any set?: (v: T) => any } + + type ModelRef = Ref & [ + ModelRef, + Record +] ``` - **Example**