-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript Usage #267
Typescript Usage #267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look and didn't see anything alarming. This is something that needed to be done so long ago. Thank you T_T
@dayhaysoos No problem 😄 I'm probably going to try to add in some type tests for the |
@dayhaysoos I've finished making the final touches on this PR. I made some changes and additions to the documentation to reflect the current state of use-shopping-cart to the best of my ability. If the below changes sound good to you, I think this is ready to merge and potentially deploy (docs and library) 👍🏻 Code ChangesModified numerous files. Added a All tests are passing locally on my machine (test runner GitHub Action is broken, might need to remove or fix that).
Documentation ChangesI've made several small tweaks to the wording of the documentation as well as updated the structure of the Usage section to be easier to navigate. I've also tried to make sure that there's a page for everything the library offers (besides a framework-less Getting Started section). I've also added a New Sidebar Menu StructureHere is the new sidebar menu structure for the documentation website.
|
This is amazing Andria! I love the docs re-org makes more sense to me that way! |
@dayhaysoos I think this PR is ready to squash and merge and then be deployed (docs and library). |
Will do! @andria-dev This is incredible! Just to be clear, this would be a minor update for the library, yeah? |
@dayhaysoos Minor version update works 👍🏻 |
@andria-dev just FYI the docs site is failing on Netlify for some reason although it works locally no prob. Saying that it can't find the module |
Closes #102. Closes #104. Closes #223. Closes #231.
This PR was designed to fix issues where TypeScript would not recognize the types defined at dist/react.d.ts and dist/core.d.ts. It also adds a new TypeScript usage example that illustrates that this works.
I'm not 100% sure that this PR is done. I'm sure there are some things that need to be worked out. For now, I've tested these changes in the following situations: TypeScript usage example within the Yarn workspace, TypeScript usage example standalone with the package installed via
yarn add file:///<path to tarball>
, CRA example within the Yarn workspace, and against an existing NextJS example written in JS (I converted 1 file to TSX and it worked just fine).Please drop any concerns about any changes I've made below (I might have forgotten some of the older changes I've made since it has been a while).