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

HTMLAttributes types missing? #12617

Closed
windsonR opened this issue Jul 6, 2022 · 0 comments
Closed

HTMLAttributes types missing? #12617

windsonR opened this issue Jul 6, 2022 · 0 comments

Comments

@windsonR
Copy link

windsonR commented Jul 6, 2022

Version

2.7.2

Reproduction link

github.com/windsonR/dd.git

Steps to reproduce

  1. clone reproduction repo
  2. yarn
  3. see code in B.tsx, at line 6, it will show an error.
TS2322: Type '{ slot: string; class: string; }' is not assignable to type 'ElementAttrs<HTMLAttributes>'.   Property 'slot' does not exist on type 'ElementAttrs<HTMLAttributes>'.

What is expected?

Don't show error

What is actually happening?

Typescript types error in tsx file.
If i add a slot?:string in this declared interface (

export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
) ,it won't show this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant