/** * This represents the constructor for a particular object. */ export declare type ConstructorFunction = new (...args: any[]) => T; /** * This is a function that takes some args and returns a boolean */ export declare type Predicate = (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 declare type AnyFunc = (...args: any[]) => R; /** * Modifies the return value of a function of up to 7 parameters. * @param F a function with up to 7 parameters * @param R the new return value of the function * @returns the function `F` with new return value `R` */ export declare type OverwriteReturn = F extends ((...x: infer T) => unknown) ? ((...x: T) => R) : never; /** * Returns a tuple type of a functions arguments up to 7. * @param F a function with up to 7 arguments * @returns a tuple containing `F`'s argument types */ export declare type ArgsAsTuple = F extends ((...x: infer T) => unknown) ? T : never;