File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
- import { VNode , defineComponent , ref } from '../../index'
1
+ import { VNode , defineComponent , ref , RenderContext } from '../../index'
2
2
import { expectType } from '../utils'
3
3
4
4
expectType < VNode > ( < div /> )
@@ -25,7 +25,13 @@ expectType<JSX.Element>(<div ref="bar" />)
25
25
// allow Ref type type on arbitrary element
26
26
const fooRef = ref < HTMLElement > ( )
27
27
expectType < JSX . Element > ( < div ref = { fooRef } /> )
28
- expectType < JSX . Element > ( < div ref = { ( el ) => { fooRef . value = el as HTMLElement } } /> )
28
+ expectType < JSX . Element > (
29
+ < div
30
+ ref = { el => {
31
+ fooRef . value = el as HTMLElement
32
+ } }
33
+ />
34
+ )
29
35
30
36
expectType < JSX . Element > (
31
37
< input
@@ -56,5 +62,8 @@ const Foo = defineComponent({
56
62
// working
57
63
; < Foo bar = { 1 } />
58
64
; < Foo bar = { 1 } foo = "baz" />
59
-
60
65
; < div slot = "x" />
66
+
67
+ export default ( { data } : RenderContext ) => {
68
+ return < button { ...data } />
69
+ }
You can’t perform that action at this time.
0 commit comments