Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Commit

Permalink
fix: 🐛 Use any for unfoldSaga
Browse files Browse the repository at this point in the history
  • Loading branch information
Pham Tuan Manh authored and manhhailua committed Jul 5, 2019
1 parent 85ba552 commit f3b8a0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ export function createActionTypeOnSuccess(key: string): string;

export function createAction(type: string): UnfoldSagaActionExecutionType;

export function unfoldSaga(type: UnfoldSagaHandlerType, callback: UnfoldSagaCallbacksType): SagaIterator;
export function unfoldSaga(type: UnfoldSagaHandlerType, callback: UnfoldSagaCallbacksType): any;
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @flow
import { call, put } from 'redux-saga/effects';
import type { Saga } from 'redux-saga';
import { noop } from './helpers';

/**
Expand Down Expand Up @@ -151,7 +150,7 @@ export function createAction(type: string): Function {
export function* unfoldSaga(
{ handler, key }: UnfoldSagaHandlerType,
{ onBeginning = noop, onFailure = noop, onFinish = noop, onSuccess = noop }: UnfoldSagaCallbacksType = {},
): Saga<void> {
): any {
try {
yield put({ type: createActionTypeOnBeginning(key) });
yield call(onBeginning);
Expand Down

0 comments on commit f3b8a0f

Please sign in to comment.