// Type definitions
type GetterDefObj = {
    [key: PropertyKey]: () => unknown;
};
type LazyGetterStats = {
    initialized?: Set<PropertyKey> | undefined;
};
type ConstantsObjectOptions = {
    getters?: GetterDefObj | undefined;
    internals?: object | undefined;
    mixin?: object | undefined;
};
type Remap<T> = {
    [K in keyof T]: T[K];
} extends infer O ? {
    [K in keyof O]: O[K];
} : never;
// Type for generic property bag.
type PropertyBag = {
    [key: PropertyKey]: unknown;
};
// Type for generic sorted object entries.
type SortedObject<T> = {
    [key: PropertyKey]: T;
};
export type { GetterDefObj, LazyGetterStats, ConstantsObjectOptions, Remap };
/**
 * Create a lazy getter function that memoizes its result.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function createLazyGetter<T>(name: PropertyKey, getter: () => T, stats?: LazyGetterStats): () => T;
/**
 * Create a frozen constants object with lazy getters and internal properties.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function createConstantsObject(props: object, options_?: ConstantsObjectOptions): Readonly<object>;
/**
 * Define a getter property on an object.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function defineGetter<T>(object: object, propKey: PropertyKey, getter: () => T): object;
/**
 * Define a lazy getter property on an object.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function defineLazyGetter<T>(object: object, propKey: PropertyKey, getter: () => T, stats?: LazyGetterStats): object;
/**
 * Define multiple lazy getter properties on an object.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function defineLazyGetters(object: object, getterDefObj: GetterDefObj | undefined, stats?: LazyGetterStats): object;
/**
 * Compare two entry arrays by their keys for sorting.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function entryKeyComparator(a: [PropertyKey, unknown], b: [PropertyKey, unknown]): number;
/**
 * Get the enumerable own property keys of an object.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function getKeys(obj: unknown): string[];
/**
 * Get an own property value from an object safely.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function getOwn(obj: unknown, propKey: PropertyKey): unknown;
/**
 * Get all own property values from an object.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function getOwnPropertyValues<T>(obj: {
    [key: PropertyKey]: T;
} | null | undefined): T[];
/**
 * Check if an object has any enumerable own properties.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function hasKeys(obj: unknown): obj is PropertyBag;
/**
 * Check if an object has an own property.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function hasOwn(obj: unknown, propKey: PropertyKey): obj is object & PropertyBag;
/**
 * Check if a value is an object (including arrays).
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function isObject(value: unknown): value is {
    [key: PropertyKey]: unknown;
};
/**
 * Check if a value is a plain object (not an array, not a built-in).
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function isObjectObject(value: unknown): value is {
    [key: PropertyKey]: unknown;
};
// IMPORTANT: Do not use destructuring here - use direct assignment instead.
// tsgo has a bug that incorrectly transpiles destructured exports, resulting in
// `exports.SomeName = void 0;` which causes runtime errors.
// See: https://github.com/SocketDev/socket-packageurl-js/issues/3
/**
 * Alias for native Object.assign.
 * Copies all enumerable own properties from one or more source objects to a target object.
 */
export declare const objectAssign: {
    <T extends {}, U>(target: T, source: U): T & U;
    <T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
    <T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
    (target: object, ...sources: any[]): any;
};
/**
 * Get all own property entries (key-value pairs) from an object.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function objectEntries(obj: unknown): Array<[PropertyKey, unknown]>;
// IMPORTANT: Do not use destructuring here - use direct assignment instead.
// tsgo has a bug that incorrectly transpiles destructured exports, resulting in
// `exports.SomeName = void 0;` which causes runtime errors.
// See: https://github.com/SocketDev/socket-packageurl-js/issues/3
/**
 * Alias for native Object.freeze.
 * Freezes an object, preventing new properties from being added and existing properties from being removed or modified.
 */
export declare const objectFreeze: {
    <T extends Function>(f: T): T;
    <T extends {
        [idx: string]: object | U;
    }, U extends string | number | bigint | symbol | boolean>(o: T): Readonly<T>;
    <T>(o: T): Readonly<T>;
};
/**
 * Deep merge source object into target object.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function merge<T extends object, U extends object>(target: T, source: U): T & U;
/**
 * Convert an object to a new object with sorted keys.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function toSortedObject<T extends object>(obj: T): T;
/**
 * Create an object from entries with sorted keys.
 */
/*@__NO_SIDE_EFFECTS__*/
export declare function toSortedObjectFromEntries<T = unknown>(entries: Iterable<[PropertyKey, T]>): SortedObject<T>;
