import { t as AnyFunction } from "./AnyFunction-DygJG5Tn.js";

//#region src/types/ObjectPath.d.ts
type RecordFunctions<T> = keyof { [K in keyof T as NonNullable<T[K]> extends AnyFunction ? K : never]: K };
type NormalizedPath<Type, ExcludeFromType> = Path<NonNullable<Type>, Exclude<keyof NonNullable<Type>, ExcludeFromType>>;
type OfType<D, E> = NonNullable<D> extends E ? true : false;
type Path<T, K extends keyof T> = K extends string ? OfType<T[K], Record<string, any>> extends true ? OfType<T[K], ArrayLike<any>> extends true ? // biome-ignore lint/suspicious/noExplicitAny: expected here
K | `${K}.${NormalizedPath<T[K], keyof any[]>}` | `${K}[${number}]` : K | `${K}.${NormalizedPath<T[K], RecordFunctions<T[K]>>}` : K : never;
/**
 * A string type that represents a valid path to a property in an object.
 * @example
 * ```ts
 * type ObjectPathExample = ObjectPath<{
 *   a: {
 *     b: 1
 *   }
 * }>; 'a' | 'a.b'
 * ```
 */
type ObjectPath<T> = string & (Path<T, keyof T> | keyof T);
//#endregion
export { ObjectPath as t };
//# sourceMappingURL=ObjectPath-BSYwa2RB.d.ts.map