type Func = (...args: unknown[]) => unknown; declare function setFunctionName<T extends Func = Func>(fn: T, name: string, loose?: boolean): T; export = setFunctionName;