79655894

Date: 2025-06-06 12:12:41
Score: 0.5
Natty:
Report link
type ArrowFn = <TInput extends string>(input: TInput) => { complex_type: { x: 2, y: 2, my_type: TInput } };

type ExtractReturnType<T, TInput extends string> = T extends (input: TInput) => infer R ? R : never;

type GenericFn<TInput extends string> = (input: TInput) => ExtractReturnType<ArrowFn, TInput>

Figured it out

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: J. Alex Whitman