/**
 * Checks if a type extends a function or method.
 *
 * @param T - The type to check.
 * @param R - The type to resolve to if `T` extends a function `(default: T)`.
 * @see
 * {@link https://github.com/Cuppachino/type-space/blob/main/src/extract/extract-functions.ts | ExtractFunctions } for example usage.
 */
export type ExtendsFunction<T, R = T> = T extends (...args: any[]) => any ? R : never;
