File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 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'
22import { expectType } from '../utils'
33
44expectType < VNode > ( < div /> )
@@ -25,7 +25,13 @@ expectType<JSX.Element>(<div ref="bar" />)
2525// allow Ref type type on arbitrary element
2626const fooRef = ref < HTMLElement > ( )
2727expectType < 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+ )
2935
3036expectType < JSX . Element > (
3137 < input
@@ -56,5 +62,8 @@ const Foo = defineComponent({
5662// working
5763; < Foo bar = { 1 } />
5864; < Foo bar = { 1 } foo = "baz" />
59-
6065; < 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