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

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

Open
tkamenoko opened this issue Sep 10, 2022 · 2 comments
Open

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

tkamenoko opened this issue Sep 10, 2022 · 2 comments

Comments

@tkamenoko
Copy link

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

@TrejoCode
Copy link

I think the same

@wellyshen
Copy link
Owner

wellyshen commented May 21, 2023

@tkamenoko What are your React and TS versions?

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

3 participants