Skip to content

Commit 575ab7f

Browse files
committed
fix(runtime-core): incomplete type inferred by generic components
1 parent fc772db commit 575ab7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/runtime-core/src/componentProps.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ type InferPropType<T> = [T] extends [null]
122122
? U extends DateConstructor
123123
? Date | InferPropType<U>
124124
: InferPropType<U>
125+
: [T] extends [PropOptions<infer V, infer D>]
126+
? unknown extends D
127+
? V
128+
: V | D
125129
: [T] extends [Prop<infer V, infer D>]
126130
? unknown extends V
127131
? IfAny<V, V, D>

0 commit comments

Comments
 (0)