[react-big-calendar] add a new generic for resource type#30401
[react-big-calendar] add a new generic for resource type#30401amcasey merged 5 commits intoDefinitelyTyped:masterfrom
Conversation
|
@onlyann Thank you for submitting this PR! 🔔 @piotrwitek @paustint @pikpok @eps1lon @strongpauly - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
|
@onlyann The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
|
We've gotten sign-off from a reviewer 👏. A maintainer will soon review this PR and merge it if there are no issues. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for contributing to DefinitelyTyped! |
types/react-big-calendar/index.d.ts
Outdated
| // Paul Potsides <https://github.com/strongpauly> | ||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
| // TypeScript Version: 2.8 | ||
| // TypeScript Version: 2.9 |
There was a problem hiding this comment.
Why do we need to bump to 2.9?
There was a problem hiding this comment.
To use generic JSX elements as it is done in the test file.
This landed in TS 2.9 : microsoft/TypeScript#22415
There was a problem hiding this comment.
What is the implication of bumping to TypeScript 2.9 other than to get the CI build to run the test under this version?
Will that prevent consumers of this package from using it with TS 2.8 ?
I can always change the syntax in the test file to satisfy TS 2.8 if preferred.
There was a problem hiding this comment.
@eps1lon I have changed the syntax to satisfy TS 2.8. Are you happy with the PR ?
There was a problem hiding this comment.
You seem to have addressed his feedback.
|
@onlyann Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day! |
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.)
Add or edit tests to reflect the change. (Run with
npm test.)Follow the advice from the readme.
Avoid common mistakes.
Run
npm run lint package-name(ortscif notslint.jsonis present).Provide a URL to documentation or source code which provides context for the suggested changes: http://intljusticemission.github.io/react-big-calendar/examples/index.html#prop-resources
Current definition incorrectly uses the same generic type for the resource and the event.
This also fixes the definition of
onNavigate.Upgrading to Typescript 2.9 since the example should be using a generic component and that is not supported by Typescript 2.8.