TypeScript
TypeScript copied to clipboard
Why TypeScript + ReactJS does not compile the <filter> ?
import * as React from 'react';
import {Component, ReactElement} from 'react';
export interface InnerShadowProps {
}
export function InnerShadow(props:InnerShadowProps):ReactElement<any> {
return (
<svg>
<defs>
<filter></filter>
</defs>
</svg>
);
}
error TS2339: Property 'filter' does not exist on type 'JSX.IntrinsicElements'.
the problem is not the compiler, and react.d.ts in which there is no need the svg tags.