fix(types/tsx): add JSX.IntrinsicAttributes definition (#1517)

fix #1516
This commit is contained in:
wonderful-panda
2020-07-07 10:59:26 +09:00
committed by GitHub
parent 58b07069ad
commit a5b4332c69
2 changed files with 3 additions and 0 deletions

View File

@@ -5,6 +5,8 @@ const Foo = (props: { foo: number }) => props.foo
// TSX
expectType<JSX.Element>(<Foo foo={1} />)
expectType<JSX.Element>(<Foo foo={1} key="1" />)
expectType<JSX.Element>(<Foo foo={1} ref="ref" />)
// @ts-expect-error
expectError(<Foo />)
// @ts-expect-error