-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: convert project to typescript, add types #64
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.
Great work @wonderfulfrog !
I'd advice to test this locally in an external project by using npm link
.
Just to make sure the build and the types output are as expected.
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.
Looks great @wonderfulfrog, thanks for taking the time to do this 👏
2ea4f89
to
d24f5e9
Compare
The |
TODO: Remove the JS variants once the conversion to TypeScript is complete.
Also converted related files to support this change.
Some of the dev dependencies ended up in the wrong section.
Co-authored-by: Marlon Ugocioni Marcello <[email protected]> Signed-off-by: Devin Haska <[email protected]>
Covered by the new interface definition. Co-authored-by: Marlon Ugocioni Marcello <[email protected]> Signed-off-by: Devin Haska <[email protected]>
4f14618
to
e38bc91
Compare
Description
This PR updates the project to use TypeScript, and include type definitions when importing the module in other projects.
The node version was also bumped to
20.16.0
, which is the current LTS version.I did my best to break up each change into smaller commits to follow the flow of my changes. I borrowed a few files from
wethegit/react-modal
to make things easier (e.g.utils/classnames.ts
).Notes
There is a warning about different versions of TypeScript when building the project:
There aren't any build errors as a result of this warning. There is a PR open that updates TypeScript to 5.5 for API Extractor. I believe once that PR is merged the warning will disappear.