I have turned on Resharper Ultimate on a .Net Core Web Application that is using TypeScript to code React Components.
So I have a simple component class;
export class Index extends React.Component<{},{}>{
Resharper is warning me that
Generic type '_$_$RsRpExt"FromFile;....\node_modules\@types\react\index.d.ts, module=JavaScriptReferencedFilesModule:Referenced external files".React.Component' requires 1 type argument(s), but got 2
My npm packages for react are;
Dependencies:
"react": "^15.6.1",
"react-dom": "^15.6.1",
Dev Dependencies
"@types/react": "^15.0.39",
"@types/react-dom": "^15.5.1",
Looking at the typed files, I can see that the React Component takes in 2 arguments as it should:
interface Component<P = {}, S = {}> extends ComponentLifecycle<P, S> { }
class Component<P, S> {
constructor(props?: P, context?: any);
I am using webpack to compile the TS/TSX files and it is all working and the project works, however it is going to be annoying if Resharper is not playing well with the TypeScript code.
Anyone know a way to resolve this?