I would like to use the SVG use
element in a .tsx
file:
<mask id="mask1">
<use ... />
</mask>
I'm transpiling this to React calls directly. However, I keep receiving the following error:
Property 'use' does not exist on type 'JSX.IntrinsicElements'.
I believe this element is missing from the standard lib definitions. How can I declare this type for the TypeScript compiler to see, similar to how I can declare a class or variable? The usual declare var
and declare class
statements have no effect.
If that's not possible, how can I make the TypeScript compiler ignore this error?