type Static = { [K in number | string]: T; } | T[]; export type AllNestedObjects = T extends Static ? AllNestedObjects | T : never; export type NestedUpdate = { path: (string | number)[]; value: AllNestedObjects; }; /** * Creates a function for tracking and capturing updates to a {@link store}. * * Each execution of the returned function will return an array of updates to the store since the last execution. * * @param store - The store to track. * @returns A function that returns an array of updates to the store since the last execution. * * @see https://github.com/solidjs-community/solid-primitives/tree/main/packages/deep#captureStoreUpdates * * @example * ```ts * const [state, setState] = createStore({ todos: [] }); * * const getDelta = captureStoreUpdates(state); * * getDelta(); // [{ path: [], value: { todos: [] } }] * * setState("todos", ["foo"]); * * getDelta(); // [{ path: ["todos"], value: ["foo"] }] * ``` */ export declare function captureStoreUpdates(store: T): () => NestedUpdate[]; export {};