feat(types): avoid props JSDocs loss by default
option (#5871)
This commit is contained in:
parent
425310e8b6
commit
c901dca5ad
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user