Module

x/effector/packages/effector/index.d.ts>createApi

Business logic with ease ☄️
Latest
function createApi
import { createApi } from "https://dotland.deno.dev/x/effector@effector-vue%4023.1.0/packages/effector/index.d.ts";

Shorthand for creating events attached to store by providing object with reducers for them

Type Parameters

S
Api extends { [name: string]: ((store: S, e: any) => (S | void)); }

Parameters

target store

api: Api

object with reducers

Returns

[K in keyof Api]: ((store: S, e: void) => (S | void)) extends Api[K] ? EventCallable<void> : Api[K] extends ((store: S) => (S | void)) ? EventCallable<void> : Api[K] extends ((store: S, e: infer E) => (S | void)) ? EventCallable<E extends void ? Exclude<E, undefined> | void : E> : any