interface DotWalkOptions { state?: Record; prefix?: string; } interface DebouncePromise extends Promise { _clear: () => void; } export declare class Helpers { state?: Record; constructor(); /** * Traverses an object by a dotted path and returns the nested value. * If `options.prefix` is provided, starts from that subkey of state. * @param path - Dot-separated path, e.g. "a.b.c" * @param options - { state?: Object, prefix?: string } * @returns Reference to the nested object or value * * Example: * let obj = { foo: { bar: { baz: 5 } } }; * Helpers.dotWalk("bar.baz", { state: obj.foo }) // returns 5 */ dotWalk(path: string, options?: DotWalkOptions): any; setNested(state: Record, name: string, value: any): Record; /** * Creates and returns a debounced version of the given callback. * The debounced function delays invoking the callback until after delay ms have elapsed * since the last time the debounced function was invoked. * The debounce state (timeout) is stored per instance; if you need per-callback * isolation, use a closure or bind a new Helpers() instance. * * @param delay - Delay in milliseconds * @returns Debounced promise with clear method */ debounce(delay?: number): DebouncePromise; } export declare class TrackingPromise { private _state; private _callback; private _promise; private _resolve; private _reject; constructor(callback: (resolve: (value: T) => void, reject: (reason?: any) => void) => void); resolve(value: T): void; reject(reason?: any): void; isFulfilled(): boolean; isRejected(): boolean; isPending(): boolean; then(onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike) | null): Promise; catch(onRejected?: ((reason: any) => TResult | PromiseLike) | null): Promise; } declare const _default: Helpers; export default _default; //# sourceMappingURL=helpers.d.ts.map