Skip to content

Commit 81e69b2

Browse files
authoredJul 1, 2021
feat(types): support IDE renaming for props (#3656)
1 parent 1ffd48a commit 81e69b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎packages/runtime-core/src/componentProps.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ type InferPropType<T> = [T] extends [null]
109109
: T
110110

111111
export type ExtractPropTypes<O> = O extends object
112-
? { [K in RequiredKeys<O>]: InferPropType<O[K]> } &
112+
? { [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
113+
{ [K in RequiredKeys<O>]: InferPropType<O[K]> } &
113114
{ [K in OptionalKeys<O>]?: InferPropType<O[K]> }
114115
: { [K in string]: any }
115116

0 commit comments

Comments
 (0)