UNPKG

@renewx/core

Version:

Lightweight state management library with validation support

5 lines (4 loc) 372 B
import type { OmitFirstArg } from "../types/core"; import type { AnyStore } from "../types/any-store"; import type { TxFn } from "../types/tx"; export declare const tx: <Stores extends AnyStore[], SomeTxFn extends TxFn<Stores>, ToState extends Awaited<ReturnType<SomeTxFn>>>(stores: [...Stores], txFn: SomeTxFn) => ((...args: OmitFirstArg<SomeTxFn>) => Promise<ToState>);