import type { UnknownRecord } from "../../types/types"; /** * Type helper to handle object-based field selections with nested support */ type SelectedTypeFromObject> = { [K in keyof Selection & keyof T]: Selection[K] extends true ? T[K] : Selection[K] extends Record ? T[K] extends Record ? SelectedTypeFromObject : never : never; }; /** * Apply object-based field selection to a single object * @param data - The object to select fields from * @param selection - Object with true values for fields to select * @returns Object with only the selected fields */ export declare function applyObjectSelection>(data: T, selection: Selection): SelectedTypeFromObject; /** * Apply field selection to an array of objects * @param data - Array of objects to select fields from * @param selection - Object with true values for fields to select * @returns Array of objects with only the selected fields */ export declare function applySelectionToArray>(data: T[], selection: Selection): Array>; /** * Apply field selection with null/undefined handling * @param data - The object to select fields from (can be null/undefined) * @param selection - Object with true values for fields to select * @returns Object with selected fields or null/undefined */ export declare function applySelectionSafe>(data: T | null | undefined, selection: Selection): SelectedTypeFromObject | null | undefined; /** * Check if a field should be selected based on selection criteria * @param field - The field name to check * @param selection - Object with true values or undefined for all fields * @returns Whether the field should be included */ export declare function shouldSelectField(field: keyof T, selection: Record | undefined): boolean; /** * Type guard to check if a value has selected fields */ export declare function hasSelectedFields>(value: unknown, selection: Selection): value is SelectedTypeFromObject; /** * Merge object-based field selections from multiple sources * Useful for combining field selections from different query parts */ export declare function mergeObjectFieldSelections<_T extends UnknownRecord>(...selections: Array | undefined>): Record | undefined; /** * Create a field selector function for use in pipelines */ export declare function createFieldSelector>(selection: Selection): (data: T) => SelectedTypeFromObject; /** * Create a field selector for arrays */ export declare function createArrayFieldSelector>(selection: Selection): (data: T[]) => Array>; export {}; //# sourceMappingURL=select.d.ts.map