UNPKG

state-synchronizers

Version:

Deterministically update state based on other state

7 lines (6 loc) 426 B
import { StateUpdater, ComposableStateSynchronizer } from './types'; /** * @param stateKey The name of a piece of state that the synchronizer updates * @param dependenciesKeys Names of pieces of state that the synchronizer depends on */ export declare const createComposableStateSynchronizer: <S>(updater: StateUpdater<S>, stateKey: keyof S, dependenciesKeys: (keyof S)[]) => ComposableStateSynchronizer<S, keyof S>;