diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index cf73261f..dbd54539 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -120,11 +120,13 @@ type InferPropType = [T] extends [null] : V : T -export type ExtractPropTypes = O extends object - ? { [K in keyof O]?: unknown } & // This is needed to keep the relation between the option prop and the props, allowing to use ctrl+click to navigate to the prop options. see: #3656 - { [K in RequiredKeys]: InferPropType } & - { [K in OptionalKeys]?: InferPropType } - : { [K in string]: any } +export type ExtractPropTypes = { + // use `keyof Pick>` instead of `RequiredKeys` to support IDE features + [K in keyof Pick>]: InferPropType +} & { + // use `keyof Pick>` instead of `OptionalKeys` to support IDE features + [K in keyof Pick>]?: InferPropType +} const enum BooleanFlags { shouldCast,