Skip to content

Commit

Permalink
feat(types): avoid props JSDocs loss by default option (#5871)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed May 11, 2022
1 parent 425310e commit c901dca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/runtime-core/src/componentProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ const enum BooleanFlags {

// extract props which defined with default from prop options
export type ExtractDefaultPropTypes<O> = O extends object
? { [K in DefaultKeys<O>]: InferPropType<O[K]> }
// use `keyof Pick<O, DefaultKeys<O>>` instead of `DefaultKeys<O>` to support IDE features
? { [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]> }
: {}

type NormalizedProp =
Expand Down

0 comments on commit c901dca

Please sign in to comment.