Closed
Description
Encountering errors using both tsc
and webpack
when importing ES6 classes that extend React.Component
into TSX. Entry file is app.jsx
.
Compiler outputs working code, and current solution is adding ignoreDiagnostics: [2605, 2607]
to ts-loader
options in Webpack config.
TypeScript Version: 2.4.2
ts-loader Version: 2.3.4
Code
https://github.com/alecmerdler/tsx-jsx
Expected behavior:
tsc
with no errorswebpack
with no errors
Actual behavior:
error TS2339: Property 'className' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Hello> & Readonly<{ children?: ReactNode; }> & Rea...'.
error TS2607: JSX element class does not support attributes because it does not have a 'props' property.