type StateActionType = { action: (state: T) => void; }; type StateEffectType = { effect: (state: T) => void; dependencies?: (keyof T)[]; revalidate?: keyof T; }; /** * Create a state that will be reactive * @param initialState - The initial state * @returns The state * @example * const initialState = { count: 0 }; * const state = createState(initialState, []); * state.count++; */ export declare const createState: (initialState: T, actions: StateActionType[], revalidate?: keyof T) => T; /** * Create an effect that will run when the state changes * @param state - The state to watch * @param effect - The effect to run * @returns The state * @example * const state = createState(initialState, []); * const effect = createEffect(state, { effect: (state) => console.log(state.count) }); * effect.count++; */ export declare const createEffect: (state: T, effect: StateEffectType) => T; export {}; //# sourceMappingURL=state.d.ts.map