Skip to content

HTMLAttributes types missing? #12617

Closed
Closed
@windsonR

Description

@windsonR

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions