MCPcopy Create free account
hub / github.com/middleapi/orpc / use

Method use

packages/server/src/builder.ts:192–204  ·  view source on GitHub ↗
(
    middleware: AnyMiddleware,
    mapInput?: MapInputMiddleware<any, any>,
  )

Source from the content-addressed store, hash-verified

190 >
191
192 use(
193 middleware: AnyMiddleware,
194 mapInput?: MapInputMiddleware<any, any>,
195 ): BuilderWithMiddlewares<any, any, any, any, any, any> {
196 const mapped = mapInput
197 ? decorateMiddleware(middleware).mapInput(mapInput)
198 : middleware
199
200 return new Builder({
201 ...this['~orpc'],
202 middlewares: addMiddleware(this['~orpc'].middlewares, mapped),
203 }) as any
204 }
205
206 /**
207 * Sets or updates the metadata.

Callers

nothing calls this directly

Calls 3

decorateMiddlewareFunction · 0.90
addMiddlewareFunction · 0.90
mapInputMethod · 0.80

Tested by

no test coverage detected