See also:
Topic

TypeScript

Programming language
4/4/2020

Declaring custom JSX/HTML attributes in TypeScript

How to specify non-standard JSX/HTML attributes in TypeScript?

Those who switched to TypeScript may experience problems with non-standard JSX/HTML props/attributes. React's type definition file (@types/react/index.d.ts) only includes standard HTML and React elements and props/attributes.

Consider, for example, that you need to allow the banana prop of type string on the <img> element.

Read more