From 5aed733ab6b6605314cc5f24cc1b1dd9aa4413c8 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 9 Nov 2022 17:35:45 +0800 Subject: [PATCH] test: add test case for #12778 --- types/test/v3/tsx-test.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/types/test/v3/tsx-test.tsx b/types/test/v3/tsx-test.tsx index 286c16997a0..6a9dcce4fc1 100644 --- a/types/test/v3/tsx-test.tsx +++ b/types/test/v3/tsx-test.tsx @@ -1,4 +1,4 @@ -import { VNode, defineComponent, ref } from '../../index' +import { VNode, defineComponent, ref, RenderContext } from '../../index' import { expectType } from '../utils' expectType(
) @@ -25,7 +25,13 @@ expectType(
) // allow Ref type type on arbitrary element const fooRef = ref() expectType(
) -expectType(
{fooRef.value = el as HTMLElement}} />) +expectType( +
{ + fooRef.value = el as HTMLElement + }} + /> +) expectType( ; - ;
+ +export default ({ data }: RenderContext) => { + return