Type alias Action<T>

Action<T>: {
    [K in Exclude<keyof T, keyof Store<T>>]: T[K] extends ((...args) => Store.State<T> | Promise<Store.State<T>>)
        ? [K]
        : T[K] extends ((...args) => Store.State<T> | Promise<Store.State<T>>)
            ? [K, I]
            : never
}[Exclude<keyof T, keyof Store<T>>]

This Store Action helper type represents the signatures of all available Actions of any given Store by extracting all methods from the given Store that return a promisified State of that given Store. This State is interpreted as the next State after this Action was invoked.

Type Parameters

Generated using TypeDoc