import type { PostHogConfig, Properties } from '@posthog/types'; export declare function find(value: T[], predicate: (value: T) => boolean): T | undefined; export declare function eachArray(obj: E[] | null | undefined, iterator: (value: E, key: number) => void): void; export declare function each(obj: any, iterator: (value: any, key: any) => void): void; export declare const extend: (obj: Record, ...args: Record[]) => Record; /** * Object.entries() polyfill * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries */ export declare function entries(obj: Record): [string, T][]; export declare const trySafe: (fn: () => T) => T | undefined; export declare const safewrap: any = (...args: any[]) => any>(f: F) => F; export declare const safewrapClass: (klass: Function, functions: string[]) => void; export declare const stripEmptyProperties: (p: Properties) => Properties; export declare function _copyAndTruncateStrings = Record>(object: T, maxStringLength: number): T; export declare function isCrossDomainCookie(documentLocation: Location | undefined): boolean; export declare function addEventListener(element: Window | Document | Element | undefined, event: string, callback: EventListener, options?: AddEventListenerOptions): void; /** * Helper to migrate deprecated config fields to new field names with appropriate warnings * @param config - The config object to check * @param newField - The new field name to use * @param oldField - The deprecated field name to check for * @param defaultValue - The default value if neither field is set * @param loggerInstance - Optional logger instance for deprecation warnings * @returns The value to use (new field takes precedence over old field) */ export declare function migrateConfigField(config: Record, newField: string, oldField: string, defaultValue: T, loggerInstance?: { warn: (message: string) => void; }): T; export declare function isToolbarInstance(config: Pick): boolean;