From c901dca5add2c32554403e5896247fdb8aa7cf7d Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Wed, 11 May 2022 19:37:49 +0800 Subject: [PATCH] feat(types): avoid props JSDocs loss by `default` option (#5871) --- packages/runtime-core/src/componentProps.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index 6b267ad1..2f3a2fe1 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -135,7 +135,8 @@ const enum BooleanFlags { // extract props which defined with default from prop options export type ExtractDefaultPropTypes = O extends object - ? { [K in DefaultKeys]: InferPropType } + // use `keyof Pick>` instead of `DefaultKeys` to support IDE features + ? { [K in keyof Pick>]: InferPropType } : {} type NormalizedProp =