From: wonderful-panda Date: Tue, 7 Jul 2020 01:59:26 +0000 (+0900) Subject: fix(types/tsx): add JSX.IntrinsicAttributes definition (#1517) X-Git-Tag: v3.0.0-beta.19~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5b4332c69146de569ad328cac9224c3cded15c9;p=thirdparty%2Fvuejs%2Fcore.git fix(types/tsx): add JSX.IntrinsicAttributes definition (#1517) fix #1516 --- diff --git a/packages/runtime-dom/types/jsx.d.ts b/packages/runtime-dom/types/jsx.d.ts index 7b9d625cff..77216de6a8 100644 --- a/packages/runtime-dom/types/jsx.d.ts +++ b/packages/runtime-dom/types/jsx.d.ts @@ -1334,6 +1334,7 @@ declare global { // @ts-ignore supress ts:2374 = Duplicate string index signature. [name: string]: any } + interface IntrinsicAttributes extends ReservedProps {} } } diff --git a/test-dts/functionalComponent.test-d.tsx b/test-dts/functionalComponent.test-d.tsx index ea6e1b601b..6783fed61c 100644 --- a/test-dts/functionalComponent.test-d.tsx +++ b/test-dts/functionalComponent.test-d.tsx @@ -5,6 +5,8 @@ const Foo = (props: { foo: number }) => props.foo // TSX expectType() +expectType() +expectType() // @ts-expect-error expectError() // @ts-expect-error