Skip to content

Commit 197ec51

Browse files
TheEdoRanbrunorodmoreira
andauthoredSep 13, 2024··
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 <bruno@brunormoreira.com>
1 parent 495ecba commit 197ec51

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎packages/next-safe-action/src/index.types.ts

+9
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,12 @@ export type InferServerError<T> = T extends
272272
| SafeStateActionFn<infer ServerError, any, any, any, any, any>
273273
? ServerError
274274
: never;
275+
276+
277+
/**
278+
* Type of the core safe action client.
279+
*/
280+
export {
281+
SafeActionClient
282+
};
283+

0 commit comments

Comments
 (0)
Please sign in to comment.