Endpoint<T> typedef

Endpoint<T> = FutureOr<T> Function(Request request)

What a verb builder accepts: a function of the request that returns whatever the endpoint produced.

A plain shelf Handler is one of these, since a Response is a value like any other and responseFrom passes it through untouched. That is what lets a route take either without a second set of builders.

Implementation

typedef Endpoint<T> = FutureOr<T> Function(Request request);