import { StrictEffect , Effect , call as rawCall , race as rawRace , spawn , all as rawAll , delay , put } from "redux-saga/effects" ; type SagaGeneratorWithReturn < RT > = Generator < Effect , RT , any > ; type UnwrapReturnType < R > = R extends SagaGeneratorWithReturn < infer RT > ? RT : R extends Promise < infer PromiseValue > ? PromiseValue : R ; export type SagaGenerator = Generator < StrictEffect > ; export function * call < Args extends any [ ] , R > ( fn , ... args ) { return yield rawCall ( fn , ... args ) ; } export function race < T extends Record < string , unknown > > ( effects ) ; export function race < T1 , T2 > ( effects ) ; export function race < T1 , T2 , T3 > ( effects ) ; export function race < T1 , T2 , T3 , T4 > ( effects ) ; export function race < T1 , T2 , T3 , T4 , T5 > ( effects ) ; export function race < T > ( effects ) ; export function * race ( effects ) { return yield rawRace ( effects ) ; } export function all < T extends Record < string , unknown > > ( effects ) ; export function all < T1 , T2 > ( effects ) ; export function all < T1 , T2 , T3 > ( effects ) ; export function all < T1 , T2 , T3 , T4 > ( effects ) ; export function all < T1 , T2 , T3 , T4 , T5 > ( effects ) ; export function all < T > ( effects ) ; export function * all ( effects ) { return yield rawAll ( effects ) ; } export { spawn , delay , put } ;