Skip to content

<Img/> is any type because of wrong type definition #983

Open
@tkamenoko

Description

Bug Report

Describe the Bug

Img element is any type that prevents auto completion.

Expected Behavior

Img should have a valid type definition.

Screenshots

vscode

Your Environment

  • Device: Desktop PC
  • OS: Windows 11
  • Runtime: Node.js v16.16.0
  • Version: v1.2.12

Additional Information

Here is Img 's definition:

const Img: ForwardRefExoticComponent<HTMLImageElement, ImgProps>;

But react.ForwardRefExoticComponent accepts only one type argument.

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/72c1299e1ad143a84b900f7435c8b9f5f04a1d3e/types/react/index.d.ts#L773-L778

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions