I have the following code:
// tslint:disable
import * as React from 'react';
import { Input, InputProps } from '../atoms/Input/Input';
import { FormControl } from '../hoc/FormControl/FormControl';
export const FormInput = FormControl<InputProps>(Input);
Typescript will not compile it but complains:
'React' is declared but its value is never read.
If I remove the line I get:
Exported variable 'FormInput' has or is using name 'React.ComponentClass' from external module "/node_modules/@types/react/index" but cannot be named. [ts] Exported variable 'FormInput' has or is using name 'React.StatelessComponent' from external module "/node_modules/@types/react/index" but cannot be named.
I have declaration
set to true in tsconfig which is correct as this is a package.
update tsconfig.json
{
"compilerOptions": {
"jsx": "react"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With