Open dnys1 opened 1 year ago
One suggestion may be to split Context
into RequestContext
and ResponseContext
with the relevant type args for each and make TResult
the first parameter on ResponseContext
since this is likely the most important type in the response method. E.g. it would be very nice if one could write:
export function response(ctx: ResponseContext<HttpResponse>): string {
// ...
}
When trying to type just the result of the backend request, you need to specify several irrelevant types which makes the resolver verbose and hard to grok at a glance. It's also very easy to forget which type parameter corresponds to what.