Open yoginderkumar opened 6 months ago
Thanks for your contribution!
Unfortunately, though, I’m not maintaining this project anymore as recent improvements in @types/react
made it feasible to roll your own implementation: https://www.kripod.dev/blog/behind-the-as-prop-polymorphism-done-well/
Please feel free to fork the codebase if you want to.
PR Description:
This pull request addresses the changes introduced in TypeScript 4.7 regarding the handling of
package.json
exports and imports. The TypeScript team has improved the way types are resolved when using theexports
field inpackage.json
, which requires updates to our codebase to ensure compatibility.Changes:
exports
field inpackage.json
to include thetypes
entry, allowing TypeScript to correctly resolve the types when importing the library.types
field to be within theexports
object, aligning with the recommended structure in TypeScript 4.7.Reference:
Before:
After:
By making these changes, we ensure compatibility with TypeScript 4.7 and future versions, providing a smoother development experience and preventing potential issues related to type resolution.