import { Signal, Accessor, Setter } from "solid-js"; import { SolidSignal } from "../../../utils/signal.js"; declare namespace createHistory { type Extensions = [ { /** * @returns backward history, does not include existing forward history */ history: Accessor & { /** * @returns forward history */ forward: Accessor; }; }, { history: Setter & { /** * @returns if operation was able to perform */ back(): boolean; /** * @returns if operation was able to perform */ forward(): boolean; /** * @returns discarded history */ clear(): T[]; ignore(fn: () => void): void; batch(fn: () => void): void; }; } ]; type Type = SolidSignal.Extended>; type Result = ReturnType>; } declare function createHistory(value: T, options?: SolidSignal.Options): Signal & createHistory.Extensions; declare namespace createHistory { var wrap: >(signal: Sig) => Sig & Extensions ? T : never>; } export default createHistory;