Skip to content

Commit e20eb77

Browse files
authored
docs: missed return value type for useModel() (vuejs#3005)
1 parent f3b6dcf commit e20eb77

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/api/composition-api-helpers.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,17 @@ This is the underlying helper that powers [`defineModel()`](/api/sfc-script-setu
3535
props: Record<string, any>,
3636
key: string,
3737
options?: DefineModelOptions
38-
)
38+
): ModelRef
3939
4040
type DefineModelOptions<T = any> = {
4141
get?: (v: T) => any
4242
set?: (v: T) => any
4343
}
44+
45+
type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [
46+
ModelRef<T, M, G, S>,
47+
Record<M, true | undefined>
48+
]
4449
```
4550

4651
- **Example**

0 commit comments

Comments
 (0)