X extends Endpoint<unknown, infer Y> ? Y : never
Endpoint
Y
Extract the result type from an Endpoint.