Skip to content

Commit

Permalink
Added resolveValue to types
Browse files Browse the repository at this point in the history
  • Loading branch information
teneko committed Oct 29, 2021
1 parent 3173e57 commit 40c74fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ const promiseAction = promiseActionFactory<number>().simple("MY_ACTION");
declare const typeOfActionThatGotCreatedFromTheSimpleOrAdvancedActionCreator: typeof promiseAction.types.action;
declare const typeOfPromiseThatGotCreatedOfPromiseMiddleware: typeof promiseAction.types.promise;
declare const typeOfResolvedValueFromPromiseThatGotCreatedOfPromiseMiddleware: typeof promiseAction.types.resolveValue;
const promise = store.dispatch(promiseAction()).meta.promise; // OR
// = store.dispatch(promiseAction()) as any as typeof promiseAction.types.promise;
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ function createUpdatedTrigger<V, P, T extends string, TA extends PayloadActionCr
const types: {
action: PayloadActionAndMeta<V, P, T, PromiseActionsFromMeta<V, typeof resolvedAction, typeof rejectedAction>>,
promise: Promise<ResolveValueFromTriggerAction<PayloadActionAndMeta<V, P, T, PromiseActionsFromMeta<V, typeof resolvedAction, typeof rejectedAction>>>>,
resolveValue: V
} = {} as any;

const sagas = {
Expand Down

0 comments on commit 40c74fb

Please sign in to comment.