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