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