@@ -215,7 +215,7 @@ export function defineSlots<
215
215
return null as any
216
216
}
217
217
218
- export type ModelRef < T , M extends string | number | symbol = string > = Ref < T > &
218
+ export type ModelRef < T , M extends PropertyKey = string > = Ref < T > &
219
219
[ ModelRef < T , M > , Record < M , true | undefined > ]
220
220
221
221
export type DefineModelOptions < T = any > = {
@@ -256,24 +256,24 @@ export type DefineModelOptions<T = any> = {
256
256
* const count = defineModel<number>('count', { default: 0 })
257
257
* ```
258
258
*/
259
- export function defineModel < T , M extends string | number | symbol = string > (
259
+ export function defineModel < T , M extends PropertyKey = string > (
260
260
options : { required : true } & PropOptions < T > & DefineModelOptions < T > ,
261
261
) : ModelRef < T , M >
262
- export function defineModel < T , M extends string | number | symbol = string > (
262
+ export function defineModel < T , M extends PropertyKey = string > (
263
263
options : { default : any } & PropOptions < T > & DefineModelOptions < T > ,
264
264
) : ModelRef < T , M >
265
- export function defineModel < T , M extends string | number | symbol = string > (
265
+ export function defineModel < T , M extends PropertyKey = string > (
266
266
options ?: PropOptions < T > & DefineModelOptions < T > ,
267
267
) : ModelRef < T | undefined , M >
268
- export function defineModel < T , M extends string | number | symbol = string > (
268
+ export function defineModel < T , M extends PropertyKey = string > (
269
269
name : string ,
270
270
options : { required : true } & PropOptions < T > & DefineModelOptions < T > ,
271
271
) : ModelRef < T , M >
272
- export function defineModel < T , M extends string | number | symbol = string > (
272
+ export function defineModel < T , M extends PropertyKey = string > (
273
273
name : string ,
274
274
options : { default : any } & PropOptions < T > & DefineModelOptions < T > ,
275
275
) : ModelRef < T , M >
276
- export function defineModel < T , M extends string | number | symbol = string > (
276
+ export function defineModel < T , M extends PropertyKey = string > (
277
277
name : string ,
278
278
options ?: PropOptions < T > & DefineModelOptions < T > ,
279
279
) : ModelRef < T | undefined , M >
0 commit comments