/**
 * Type helper utilities for safer TypeScript patterns.
 *
 * These helpers provide additional type safety beyond built-in utility types.
 */
/**
 * StrictOmit: A safer version of Omit that ensures the keys being omitted
 * actually exist on the type. This catches typos and refactoring errors.
 *
 * The built-in Omit<T, K> allows any string key, even ones that don't exist on T:
 *
 * @example
 * ```ts
 * // Built-in Omit - doesn't catch typos
 * type A = Omit<{ foo: string }, "fooo">; // No error! "fooo" is accepted
 *
 * // StrictOmit - catches typos at compile time
 * type B = StrictOmit<{ foo: string }, "fooo">; // Error: "fooo" not in "foo"
 * ```
 */
export type StrictOmit<T, K extends keyof T> = Omit<T, K>;
/**
 * StrictPick: A documented alias for Pick that emphasizes key validation.
 * (Pick already enforces key existence, but this makes intent clearer)
 */
export type StrictPick<T, K extends keyof T> = Pick<T, K>;
/**
 * StrictExtract: Extract members from a union that are assignable to U.
 * Ensures U is actually part of the union T.
 */
export type StrictExtract<T, U extends T> = Extract<T, U>;
/**
 * RequireKeys: Make specific keys required while keeping others unchanged.
 *
 * @example
 * ```ts
 * interface User { name?: string; age?: number; email?: string; }
 * type UserWithName = RequireKeys<User, "name">;
 * // Result: { name: string; age?: number; email?: string; }
 * ```
 */
export type RequireKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
/**
 * PartialKeys: Make specific keys optional while keeping others unchanged.
 *
 * @example
 * ```ts
 * interface User { name: string; age: number; email: string; }
 * type UserPartialAge = PartialKeys<User, "age">;
 * // Result: { name: string; age?: number; email: string; }
 * ```
 */
export type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
/**
 * DeepReadonly: Make all properties in T and nested objects readonly.
 *
 * @example
 * ```ts
 * type Config = { settings: { theme: string } };
 * type ReadonlyConfig = DeepReadonly<Config>;
 * // settings.theme is also readonly
 * ```
 */
export type DeepReadonly<T> = T extends (infer U)[] ? readonly DeepReadonly<U>[] : T extends object ? {
    readonly [K in keyof T]: DeepReadonly<T[K]>;
} : T;
/**
 * Mutable: Remove readonly modifier from all properties.
 * Useful when you need to build an object before freezing it.
 */
export type Mutable<T> = {
    -readonly [K in keyof T]: T[K];
};
//# sourceMappingURL=helpers.d.ts.map