Repository navigation
Add types for react-resolver - #21850
Conversation
|
types/react-resolver/index.d.ts Checklist
|
|
@forabi Please address comments from the code reviewers. |
| "noImplicitAny": true, | ||
| "noImplicitThis": true, | ||
| "strictNullChecks": true, | ||
| "strictFunctionTypes": false, |
There was a problem hiding this comment.
For new packages, strictFunctionTypes should be enabled.
At least you can disable the rule by adding // @ts-ignore in source code: https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#suppress-errors-in-ts-files-using--ts-ignore-comments
There was a problem hiding this comment.
I'm getting an error in the tests that says typeof Page is not compatible with ComponentType<P> because it is not assignable to StatelessComponent<P>, even though Page extends React.Component<P>. I think this is an issue in React types.
|
Approved by third party. PR appears ready to merge pending review by a maintainer. |
Please fill in this template.
Use a meaningful title for the pull request. Include the name of the package modified.
Test the change in your own code. (Compile and run.)
Follow the advice from the readme.
Avoid common mistakes.
Run
npm run lint package-name(ortscif notslint.jsonis present).The package does not provide its own types, and you can not add them.
If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
Create it with
dts-gen --dt, not by basing it on an existing project.tslint.jsonshould be present, andtsconfig.jsonshould havenoImplicitAny,noImplicitThis,strictNullChecks, andstrictFunctionTypesset totrue.