import curryN from './utils/curry_n.ts';import type { Obj, PH } from './utils/types.ts';import type { Prop } from './prop.ts';import { is } from './utils/is.ts';
type PropIs_1<T> = (type: string) => boolean;
type PropIs_2<T> = (name: Prop) => boolean;
type PropIs_3 = <T>(obj: Obj<T>) => boolean;
type PropIs_2_3 = & ((name: Prop) => PropIs_3) & (<T>(name: PH, obj: Obj<T>) => PropIs_2<T>) & (<T>(name: Prop, obj: Obj<T>) => boolean);
type PropIs_1_3 = & ((type: string) => PropIs_3) & (<T>(type: PH, obj: Obj<T>) => PropIs_1<T>) & (<T>(type: string, obj: Obj<T>) => boolean);
type PropIs_1_2<T> = & ((type: string) => PropIs_2<T>) & ((type: PH, name: Prop) => PropIs_1<T>) & ((type: string, name: Prop) => boolean);
type PropIs = & ((type: string) => PropIs_2_3) & ((type: PH, name: Prop) => PropIs_1_3) & (<T>(type: PH, name: PH, obj: Obj<T>) => PropIs_1_2<T>) & ((type: string, name: Prop) => PropIs_3) & (<T>(type: string, name: PH, obj: Obj<T>) => PropIs_2<T>) & (<T>(type: PH, name: Prop, obj: Obj<T>) => PropIs_1<T>) & (<T>(type: string, name: Prop, obj: Obj<T>) => boolean);
function _propIs<T>(type: string, name: Prop, obj: Obj<T>) { return is(obj[name], type);}
export const propIs: PropIs = curryN(3, _propIs);