MCPcopy Create free account
hub / github.com/deanrad/rxfx / createCustomEffect

Function createCustomEffect

effect/src/createEffect.ts:439–450  ·  view source on GitHub ↗
(
  handler: EffectSource<Request, Response>,
  concurrencyOperator = mergeMap,
  initialState?: TState
)

Source from the content-addressed store, hash-verified

437
438/** Creates an Effect - A higher-order wrapper around a Promise-or-Observable-or-AsyncIterator returning function.
439 * The effect is debounced for `msec`, meaning a new invocation waits to being, and interrupts any existing delay or execution.
440 * The effect is cancelable if it returns an Observable. `createDebouncedEffect` runs in concurrency mode: "toggling".
441 * @summary ![switching mode](https://d2jksv3bi9fv68.cloudfront.net/rxfx/mode-switching-sm.png)
442 */
443export function createDebouncedEffect(
444 msec: number = DEFAULT_DEBOUNCE_INTERVAL
445) {
446 return function <
447 Request,
448 Response = void,
449 TError extends Error = Error,
450 TState = Response
451 >(
452 handler: EffectSource<Request, Response>,
453 initialState?: TState,

Callers 1

Calls 1

createEffectFunction · 0.85

Tested by

no test coverage detected