Taxum / @taxum/core / middleware/from-fn / FromFnLayer
Class: FromFnLayer<Next, Request, Response>
Defined in: middleware/from-fn.ts:39
A layer that wraps a service with a function.
See
Type Parameters
Next
Next
extends AnyService
Request
Request
Response
Response
Implements
Constructors
Constructor
new FromFnLayer<
Next
,Request
,Response
>(f
):FromFnLayer
<Next
,Request
,Response
>
Defined in: middleware/from-fn.ts:47
Creates a new FromFnLayer.
Parameters
f
FromFnClosure
<Next
, Request
, Response
>
Returns
FromFnLayer
<Next
, Request
, Response
>
Methods
layer()
layer(
inner
):Service
<Request
,Response
>
Defined in: middleware/from-fn.ts:51
Wrap the given service with the middleware, returning a new service that has been decorated with the middleware.
Parameters
inner
Next
Returns
Service
<Request
, Response
>