@@ -112,7 +112,7 @@ export interface ComponentOptionsBase<
112
112
I extends ComponentInjectOptions = { } ,
113
113
II extends string = string ,
114
114
S extends SlotsType = { } ,
115
- Attrs extends AttrsType = { }
115
+ Attrs extends AttrsType | undefined = undefined
116
116
> extends LegacyOptions < Props , D , C , M , Mixin , Extends , I , II > ,
117
117
ComponentInternalOptions ,
118
118
ComponentCustomOptions {
@@ -226,7 +226,7 @@ export type ComponentOptionsWithoutProps<
226
226
I extends ComponentInjectOptions = { } ,
227
227
II extends string = string ,
228
228
S extends SlotsType = { } ,
229
- Attrs extends AttrsType = { } ,
229
+ Attrs extends AttrsType | undefined = undefined ,
230
230
PE = Props & EmitsToProps < E >
231
231
> = ComponentOptionsBase <
232
232
PE ,
@@ -277,7 +277,7 @@ export type ComponentOptionsWithArrayProps<
277
277
I extends ComponentInjectOptions = { } ,
278
278
II extends string = string ,
279
279
S extends SlotsType = { } ,
280
- Attrs extends AttrsType = { } ,
280
+ Attrs extends AttrsType | undefined = undefined ,
281
281
Props = Prettify < Readonly < { [ key in PropNames ] ?: any } & EmitsToProps < E > > >
282
282
> = ComponentOptionsBase <
283
283
Props ,
@@ -328,7 +328,7 @@ export type ComponentOptionsWithObjectProps<
328
328
I extends ComponentInjectOptions = { } ,
329
329
II extends string = string ,
330
330
S extends SlotsType = { } ,
331
- Attrs extends AttrsType = { } ,
331
+ Attrs extends AttrsType | undefined = undefined ,
332
332
Props = Prettify < Readonly < ExtractPropTypes < PropsOptions > & EmitsToProps < E > > > ,
333
333
Defaults = ExtractDefaultPropTypes < PropsOptions >
334
334
> = ComponentOptionsBase <
@@ -421,17 +421,17 @@ declare const AttrSymbol: unique symbol
421
421
export type AttrsType < T extends Record < string , any > = Record < string , any > > = {
422
422
[ AttrSymbol ] ?: T
423
423
}
424
+
424
425
export type UnwrapAttrsType <
425
- S extends AttrsType ,
426
- T = NonNullable < S [ typeof AttrSymbol ] >
427
- > = [ keyof S ] extends [ never ]
426
+ Attrs extends AttrsType ,
427
+ T = NonNullable < Attrs [ typeof AttrSymbol ] >
428
+ > = [ keyof Attrs ] extends [ never ]
428
429
? Data
429
430
: Readonly <
430
431
Prettify < {
431
432
[ K in keyof T ] : T [ K ]
432
433
} >
433
434
>
434
-
435
435
export type ComputedOptions = Record <
436
436
string ,
437
437
ComputedGetter < any > | WritableComputedOptions < any >
0 commit comments