/**
 * TypeScript Utility Types and Helper Functions
 *
 * Provides comprehensive TypeScript utilities for:
 * - Advanced type manipulation
 * - Functional programming patterns
 * - Immutable data structures
 * - Runtime type checking
 */
/**
 * Deep Readonly type for complete immutability
 */
export type DeepReadonly<T> = {
    readonly [P in keyof T]: T[P] extends object ? DeepReadonly<T[P]> : T[P];
};
/**
 * Make specific properties optional
 */
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
/**
 * Make specific properties required
 */
export type RequiredBy<T, K extends keyof T> = T & Required<Pick<T, K>>;
/**
 * Extract only function properties from type
 */
export type FunctionProperties<T> = {
    [K in keyof T]: T[K] extends (...args: unknown[]) => unknown ? T[K] : never;
};
/**
 * Extract only data properties from type
 */
export type DataProperties<T> = {
    [K in keyof T]: T[K] extends (...args: unknown[]) => unknown ? never : T[K];
};
/**
 * Branded type for nominal typing
 */
export type Brand<T, B> = T & {
    readonly __brand: B;
};
/**
 * Union to intersection type
 */
export type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
/**
 * Async function return type
 */
export type AsyncReturnType<T extends (...args: unknown[]) => unknown> = T extends (...args: unknown[]) => Promise<infer R> ? R : never;
/**
 * Constructor type
 */
export type Constructor<T = unknown> = new (...args: unknown[]) => T;
/**
 * Instance type from constructor
 */
export type InstanceType<T extends Constructor> = T extends Constructor<infer R> ? R : never;
/**
 * Runtime type checking utilities
 */
export declare class TypeGuards {
    /**
     * Check if value is a string
     */
    static isString(value: unknown): value is string;
    /**
     * Check if value is a number
     */
    static isNumber(value: unknown): value is number;
    /**
     * Check if value is a boolean
     */
    static isBoolean(value: unknown): value is boolean;
    /**
     * Check if value is an object (not null, not array)
     */
    static isObject(value: unknown): value is Record<string, unknown>;
    /**
     * Check if value is an array
     */
    static isArray(value: unknown): value is unknown[];
    /**
     * Check if value is a function
     */
    static isFunction(value: unknown): value is (...args: unknown[]) => unknown;
    /**
     * Check if value is null or undefined
     */
    static isNil(value: unknown): value is null | undefined;
    /**
     * Check if value has a specific property
     */
    static hasProperty<T extends string>(value: unknown, property: T): value is {
        [K in T]: unknown;
    };
}
/**
 * Functional programming utilities
 */
export declare class Functional {
    /**
     * Compose multiple functions
     */
    static compose<T>(...fns: Array<(x: T) => T>): (x: T) => T;
    /**
     * Pipe value through multiple functions
     */
    static pipe<T>(value: T, ...fns: Array<(x: T) => T>): T;
    /**
     * Memoize function with cache
     */
    static memoize<T extends (...args: unknown[]) => unknown>(fn: T, cacheKey?: (...args: Parameters<T>) => string): T;
    /**
     * Debounce function execution
     */
    static debounce<T extends (...args: unknown[]) => unknown>(fn: T, delay: number): (...args: Parameters<T>) => void;
    /**
     * Throttle function execution
     */
    static throttle<T extends (...args: unknown[]) => unknown>(fn: T, delay: number): (...args: Parameters<T>) => void;
}
/**
 * Immutable data utilities
 */
export declare class Immutable {
    /**
     * Deep freeze object
     */
    static deepFreeze<T>(obj: T): DeepReadonly<T>;
    /**
     * Create immutable copy with updates
     */
    static update<T extends Record<string, unknown>>(obj: T, updates: Partial<T>): T;
    /**
     * Create immutable copy with nested updates
     */
    static updateIn<T extends Record<string, unknown>>(obj: T, path: string[], value: unknown): T;
}
/**
 * Type-safe event emitter
 */
export declare class TypedEventEmitter<T extends Record<string, unknown[]>> {
    private listeners;
    /**
     * Add event listener
     */
    on<K extends keyof T>(event: K, listener: (...args: T[K]) => void): void;
    /**
     * Remove event listener
     */
    off<K extends keyof T>(event: K, listener: (...args: T[K]) => void): void;
    /**
     * Emit event
     */
    emit<K extends keyof T>(event: K, ...args: T[K]): void;
    /**
     * Remove all listeners
     */
    removeAllListeners(): void;
}
/**
 * Utility functions for common TypeScript patterns
 */
export declare class TypeScriptUtils {
    /**
     * Assert value is not null or undefined
     */
    static assertDefined<T>(value: T | null | undefined, message?: string): asserts value is T;
    /**
     * Create type-safe enum from array
     */
    static createStringEnum<T extends string>(values: readonly T[]): {
        [K in T]: K;
    };
    /**
     * Create branded type
     */
    static createBranded<T, B>(value: T): Brand<T, B>;
    /**
     * Extract keys from type that match a condition
     */
    static extractKeys<T extends object>(obj: T, predicate: (key: keyof T, value: T[keyof T]) => boolean): Array<keyof T>;
    /**
     * Pick properties from object
     */
    static pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
    /**
     * Omit properties from object
     */
    static omit<T, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
}
//# sourceMappingURL=utilityTypes.d.ts.map