Skip to content

Add types for react-resolver - #21850

Merged
minestarks merged 7 commits into
DefinitelyTyped:masterfrom
forabi:react-resolver
Dec 11, 2017
Merged

minestarks merged 7 commits into
DefinitelyTyped:masterfrom
forabi:react-resolver

Conversation

@forabi

@forabi forabi commented Nov 29, 2017

Copy link
Copy Markdown
Contributor

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 (or tsc if no tslint.json is 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.json should be present, and tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

@dt-bot

dt-bot commented Nov 29, 2017

Copy link
Copy Markdown
Member

@typescript-bot typescript-bot added New Definition This PR creates a new definition package. The Travis CI build failed labels Nov 29, 2017
@typescript-bot

typescript-bot commented Nov 29, 2017 •

Copy link
Copy Markdown
Contributor

@forabi Please address comments from the code reviewers.

"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Dec 1, 2017
@typescript-bot typescript-bot added Other Approved This PR was reviewed and signed-off by a community member. and removed Revision needed This PR needs code changes before it can be merged. labels Dec 1, 2017
@typescript-bot

Copy link
Copy Markdown
Contributor

Approved by third party. PR appears ready to merge pending review by a maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Definition This PR creates a new definition package. Other Approved This PR was reviewed and signed-off by a community member.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants