From 197ec513e605c0814ab5a1ec1190f979b483437b Mon Sep 17 00:00:00 2001 From: Edoardo Ranghieri Date: Fri, 13 Sep 2024 15:47:32 +0200 Subject: [PATCH] fix: export `SafeActionClient` type to make it portable (#267) (#269) 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 --- packages/next-safe-action/src/index.types.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/next-safe-action/src/index.types.ts b/packages/next-safe-action/src/index.types.ts index 03a6ab3..94b85ae 100644 --- a/packages/next-safe-action/src/index.types.ts +++ b/packages/next-safe-action/src/index.types.ts @@ -272,3 +272,12 @@ export type InferServerError = T extends | SafeStateActionFn ? ServerError : never; + + +/** + * Type of the core safe action client. + */ +export { + SafeActionClient +}; +