Skip to content

Commit

Permalink
fix: small change to ActionFactory in dux.ts to make actions better
Browse files Browse the repository at this point in the history
  • Loading branch information
baetheus committed May 18, 2024
1 parent 8386713 commit 63f0f18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@baetheus/fun",
"version": "2.2.0",
"version": "2.2.1",
"exports": {
"./ideas/dux": "./ideas/dux.ts",
"./applicable": "./applicable.ts",
Expand Down
6 changes: 4 additions & 2 deletions ideas/dux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ export type ActionMatcher<P> = {
};

/**
* Interface for action creator function
* Interface for action creator function. We could type the output action but
* that causes specificity issues when branching to the creation of more than
* one action.
*
* @since 2.1.0
*/
export type ActionFunction<P> = (payload: P) => Action<P>;
export type ActionFunction<P> = (payload: P) => ActionType;

/**
* Interface for action creator intersection
Expand Down

0 comments on commit 63f0f18

Please sign in to comment.