diff --git a/types/v3-setup-helpers.d.ts b/types/v3-setup-helpers.d.ts index 165605ee51..ce255a6dba 100644 --- a/types/v3-setup-helpers.d.ts +++ b/types/v3-setup-helpers.d.ts @@ -43,7 +43,20 @@ export function defineProps< PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions >(props: PP): Readonly> // overload 3: typed-based declaration -export function defineProps(): Readonly +export function defineProps(): DefineProps< + TypeProps, + BooleanKey +> + +type DefineProps = Readonly & { + readonly [K in BKeys]-?: boolean +} + +type BooleanKey = K extends any + ? [T[K]] extends [boolean | undefined] + ? K + : never + : never /** * Vue `