How to use typed-redux-saga - 5 common examples

To help you get started, we’ve selected a few typed-redux-saga examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github berty / berty / js / packages / store / sagaUtils.ts View on Github external
export function* unaryChan EventChannel>(
	func: F,
	...args: Parameters
) {
	const chan = yield* call(func, ...args)
	const reply = (yield* take(chan)) as EventChannelOutput>
	chan.close()
	return reply
}
github berty / berty / js / packages / store / sagaUtils.ts View on Github external
export function* typedCall any>(func: F, ...args: Parameters) {
	const ret = (yield call(func, ...args)) as ReturnType
	return ret
}
github berty / berty / js / packages / store / sagaUtils.ts View on Github external
export function* unaryChan EventChannel>(
	func: F,
	...args: Parameters
) {
	const chan = yield* call(func, ...args)
	const reply = (yield* take(chan)) as EventChannelOutput>
	chan.close()
	return reply
}

typed-redux-saga

Redux-Saga effects with strong types.

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis