import { If } from './conditionals' ; import { IsAny } from './predicates' ; /**
 * This represents the constructor for a particular object.
 */ export type ConstructorFunction < T extends object > = new ( ... args ) => T ; /**
 * This is a function that takes some args and returns a boolean
 */ export type Predicate < A = any > = ( arg : A ) => boolean ; /**
 * Concisely and cleanly define an arbitrary function.
 * Useful when designing many api's that don't care what function they take in, they just need to know what it returns.
 */ export type AnyFunc < R = any > = ( ... args : any [ ] ) => R ; param F param R returns export type OverwriteReturn < F extends Function , R > = F extends ( ( ... x : infer T ) => unknown ) ? ( ( ... x : T ) => R ) : never ; param F returns export type ArgsAsTuple < F extends Function > = F extends ( ( ... x : infer T ) => unknown ) ? T : never ;