Skip to content
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

fix: export SafeActionClient type to make it portable #267

Conversation

brunorodmoreira
Copy link
Contributor

@brunorodmoreira brunorodmoreira commented Sep 11, 2024

Includes the SafeActionClient into the types export to make the inferred type of createSafeActionClient portable in order to avoid the error TS2742. It enables declaring the action client in a shared package and import it in the other apps or packages.

image

Proposed changes

Put your proposed changes here.

I've just exported the type in the index.types.ts file.

Related issue(s) or discussion(s)


Copy link

vercel bot commented Sep 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-safe-action-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2024 3:48pm

Copy link

vercel bot commented Sep 11, 2024

@brunorodmoreira is attempting to deploy a commit to the Edoardo Ranghieri's projects Team on Vercel.

A member of the Team first needs to authorize it.

@TheEdoRan
Copy link
Owner

Hi Bruno, thanks for your contribution. Does this solve #64?

@brunorodmoreira
Copy link
Contributor Author

Hi Bruno, thanks for your contribution. Does this solve #64?

Yes!

Copy link

@dan5py dan5py left a comment

Choose a reason for hiding this comment

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

👍

@TheEdoRan TheEdoRan changed the title feat(types): include SafeActionClient exporting from the types entryp… fix: export SafeActionClient type to make it portable Sep 13, 2024
@TheEdoRan TheEdoRan changed the base branch from main to beta September 13, 2024 13:32
@TheEdoRan TheEdoRan merged commit d2d7bdd into TheEdoRan:beta Sep 13, 2024
4 of 5 checks passed
Copy link

🎉 This PR is included in version 7.9.3-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

TheEdoRan added a commit that referenced this pull request Sep 13, 2024
Includes the `SafeActionClient` into the types export to make the
inferred type of `createSafeActionClient` portable in order to avoid the
error [TS2742](https://typescript.tv/errors/#ts2742). It enables
declaring the action client in a shared package and import it in the
other apps or packages.

closes #64

Co-authored-by: Bruno Moreira <[email protected]>
@TheEdoRan
Copy link
Owner

@brunorodmoreira the fix indeed seems to work. It's just ridiculous to me that it was this easy all this time. Oh well, learned something today. Small but amazing contribution Bruno, thank you very much once again! Fix is included in v7.9.3.

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

Successfully merging this pull request may close these issues.

3 participants