feat(types): support IDE renaming for props (#3656)
This commit is contained in:
parent
1ffd48a2f5
commit
81e69b29ec
@ -109,7 +109,8 @@ type InferPropType<T> = [T] extends [null]
|
|||||||
: T
|
: T
|
||||||
|
|
||||||
export type ExtractPropTypes<O> = O extends object
|
export type ExtractPropTypes<O> = O extends object
|
||||||
? { [K in RequiredKeys<O>]: InferPropType<O[K]> } &
|
? { [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<O>]: InferPropType<O[K]> } &
|
||||||
{ [K in OptionalKeys<O>]?: InferPropType<O[K]> }
|
{ [K in OptionalKeys<O>]?: InferPropType<O[K]> }
|
||||||
: { [K in string]: any }
|
: { [K in string]: any }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user