@@ -112,7 +112,7 @@ export interface ComponentOptionsBase<
112112 I extends ComponentInjectOptions = { } ,
113113 II extends string = string ,
114114 S extends SlotsType = { } ,
115- Attrs extends AttrsType = { }
115+ Attrs extends AttrsType | undefined = undefined
116116> extends LegacyOptions < Props , D , C , M , Mixin , Extends , I , II > ,
117117 ComponentInternalOptions ,
118118 ComponentCustomOptions {
@@ -226,7 +226,7 @@ export type ComponentOptionsWithoutProps<
226226 I extends ComponentInjectOptions = { } ,
227227 II extends string = string ,
228228 S extends SlotsType = { } ,
229- Attrs extends AttrsType = { } ,
229+ Attrs extends AttrsType | undefined = undefined ,
230230 PE = Props & EmitsToProps < E >
231231> = ComponentOptionsBase <
232232 PE ,
@@ -277,7 +277,7 @@ export type ComponentOptionsWithArrayProps<
277277 I extends ComponentInjectOptions = { } ,
278278 II extends string = string ,
279279 S extends SlotsType = { } ,
280- Attrs extends AttrsType = { } ,
280+ Attrs extends AttrsType | undefined = undefined ,
281281 Props = Prettify < Readonly < { [ key in PropNames ] ?: any } & EmitsToProps < E > > >
282282> = ComponentOptionsBase <
283283 Props ,
@@ -328,7 +328,7 @@ export type ComponentOptionsWithObjectProps<
328328 I extends ComponentInjectOptions = { } ,
329329 II extends string = string ,
330330 S extends SlotsType = { } ,
331- Attrs extends AttrsType = { } ,
331+ Attrs extends AttrsType | undefined = undefined ,
332332 Props = Prettify < Readonly < ExtractPropTypes < PropsOptions > & EmitsToProps < E > > > ,
333333 Defaults = ExtractDefaultPropTypes < PropsOptions >
334334> = ComponentOptionsBase <
@@ -421,17 +421,17 @@ declare const AttrSymbol: unique symbol
421421export type AttrsType < T extends Record < string , any > = Record < string , any > > = {
422422 [ AttrSymbol ] ?: T
423423}
424+
424425export 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 ]
428429 ? Data
429430 : Readonly <
430431 Prettify < {
431432 [ K in keyof T ] : T [ K ]
432433 } >
433434 >
434-
435435export type ComputedOptions = Record <
436436 string ,
437437 ComputedGetter < any > | WritableComputedOptions < any >
0 commit comments