Here is my Code which works perfect in both conditions
export function* Login(action: PayloadAction<ILogin>) {
try {
//some code here
} catch {}
}
export function* Login(action: any) {
try {
//some code here
} catch {}
}
Thanks for help