import { C as CastToString } from './CastToString-BoaHrryS.cjs';
import { K as KeysOfUnion } from './KeysOfUnion-BrkZWXzm.cjs';
import { Get, UnionToIntersection } from 'type-fest';

/**
 * Similar to `T[K]`, but gets the value of all the types in a union.
 */
type PropertyValueOfUnion<T extends object, K extends KeysOfUnion<T>> = Get<UnionToIntersection<T>, K & string>;

type ObjectPredicate<T extends object> = (value: Exclude<PropertyValueOfUnion<T, KeysOfUnion<T>>, undefined>, key: CastToString<KeysOfUnion<T>>, object: T) => boolean;

export type { ObjectPredicate as O, PropertyValueOfUnion as P };
