Consider this:
import type { JSX } from 'react';
const MyComponent = (): JSX.Element => (
<div data-attr="bar">Foo</div>
);
This does not give any TypeScript error which is expected, however, I cannot find types for data-* custom attributes, something like
interface *** {
// other attributes...
`data-${string}`: string
}
Can anyone please tell me where in d.ts files are defining this?
-is considered valid by Typescript, ie.<div what-is-this="hello" >asd</div>.data-*attribute), it is not considered to be an error if it is not found in the element attributes type."