Skip to content

Commit e604532

Browse files
jay-esaltrusl
andauthored
docs: missed return value type for useModel() (#3005) (#2301)
Co-authored-by: Ruslan Makarov <[email protected]>
1 parent 8ef8be0 commit e604532

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 @@ TypeScript を使用する場合は、代わりに [`defineSlots()`](/api/sfc-sc
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
- ****

0 commit comments

Comments
 (0)