TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Why TypeScript + ReactJS does not compile the <filter> ?

Open acopalipsis opened this issue 10 years ago • 1 comments

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'.

acopalipsis avatar Jun 16 '16 10:06 acopalipsis

the problem is not the compiler, and react.d.ts in which there is no need the svg tags.

acopalipsis avatar Jun 16 '16 11:06 acopalipsis