Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TSX] Functional component does not accept known attributes #1516

Closed
wonderful-panda opened this issue Jul 6, 2020 · 0 comments
Closed

[TSX] Functional component does not accept known attributes #1516

wonderful-panda opened this issue Jul 6, 2020 · 0 comments

Comments

@wonderful-panda
Copy link
Contributor

Version

3.0.0-beta.18

Reproduction link

https://codesandbox.io/s/vue-tsx-typeerror-repro-q2j4r?file=/src/main.tsx

Steps to reproduce

const HelloWorld = (props: { msg: string }) => (<div>{props.msg}</div>);
const vm = <HelloWorld msg="foo" key="1" />; 

What is expected?

No compilation error

What is actually happening?

Compilation error at second line

Type '{ msg: string; key: string; }' is not assignable to type '{ foo: string; }'.
  Property 'key' does not exist on type '{ msg: string; }'.ts(2322)
wonderful-panda added a commit to wonderful-panda/vue-next that referenced this issue Jul 6, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants