File tree 2 files changed +4
-5
lines changed
packages/runtime-core/src
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -141,9 +141,9 @@ export function h<P>(
141
141
) : VNode
142
142
143
143
// component without props
144
- export function h (
145
- type : Component ,
146
- props : null ,
144
+ export function h < P > (
145
+ type : Component < P > ,
146
+ props ?: ( RawProps & P ) | null ,
147
147
children ?: RawChildren | RawSlots
148
148
) : VNode
149
149
Original file line number Diff line number Diff line change @@ -145,12 +145,11 @@ describe('h inference w/ defineComponent', () => {
145
145
// expectError(h(Foo, { bar: 1, foo: 1 }))
146
146
// })
147
147
148
- // #922
148
+ // #922 and #3218
149
149
describe ( 'h support for generic component type' , ( ) => {
150
150
function foo ( bar : Component ) {
151
151
h ( bar )
152
152
h ( bar , 'hello' )
153
- // @ts -expect-error
154
153
h ( bar , { id : 'ok' } , 'hello' )
155
154
}
156
155
foo ( { } )
You can’t perform that action at this time.
0 commit comments