export type TailType = ((...args: T) => any) extends (head: any, ...tail: infer R) => any ? R : never;