import { Ref, ComputedRef } from 'vue'; import { Indexable, Any, Absence, Index, Thing, Sorter, Filter, Property } from './types'; export declare function deepCopy(object: T, allowCircular?: boolean): T; export declare function reduceDepth(object: T, maxDepth?: number, replaceWith?: Any): T; export declare function reduceLength(object: T, maxLength?: number, replaceWith?: Any): T; export declare function countDepth(obj: Any, currentDepth?: number): number; export declare function excludeProperties(obj: T, excluder: Filter | Index[]): T; export declare function reduceSize(object: T, maxChars?: number, replaceWith?: Any, excluder?: Filter | Index[]): T; export type DeepForFn = (key: string, value: Any, obj: Indexable) => unknown; /** * Iterates over all properties of an object, including nested objects, and calls the specified * function for each property. If applyToObjects is true, the function is called for objects as well. * This is useful for recursively processing all properties of an object. * * @param object - The object to recursively iterate over * @param fn - The function to call for each property * @param applyToObjects - Whether to call the function for objects as well as simple properties */ export declare function deepFor(object: Indexable, fn: DeepForFn, applyToObjects?: boolean): void; /** * Filters out null and undefined values from the specified array. * * @param arr - The array to filter * @returns - A new array with null and undefined values removed */ export declare function filterEmpty(arr?: Array | null): T[]; /** * Returns true if the specified object has the specified property as a normal member. * If the property is unknown or is defined with a setter, return false. This is * primarily used to allow Entity subclasses to have getter/setter pairs that don't * register as changes for saving. * * @param obj - The object to check * @param property - The property to check for */ export declare function hasProperty(obj: object, property: Property): boolean; /** * Extracts the first matching item from the specified array and returns it. * The extracted item is removed from the array completely. * * @param arr - The array to extract from * @param find - The filter function to find the item to extract * @returns - The extracted item, or undefined if not found */ export declare function extract(arr: T[], find: Filter): T | undefined; /** * Returns a computed array that is filtered and sorted based on the specified filter and sorter functions. * * @param source - The source array to filter and sort * @param filter - The filter function to apply to the array * @param sorter - The sorter function to apply to the array * @returns - A computed array that is filtered and sorted */ export declare function computedArray(source: Ref | (() => readonly T[]), filter?: Filter, sorter?: Sorter): ComputedRef; export declare function size(obj: object, b64?: boolean): number;