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

Method middleware

packages/server/src/implementer.ts:32–32  ·  view source on GitHub ↗

* Creates a middleware. * * @see https://orpc.dev/docs/middleware Middleware Docs

( // = any here is important to make middleware can be used in any output by default
    middleware: Middleware<
      TInitialContext,
      UOutContext,
      TInput,
      TOutput,
      ORPCErrorConstructorMap<InferContractRouterErrorMap<T>>,
      InferContractRouterMeta<T>
    >,
  )

Source from the content-addressed store, hash-verified

30 * @see {@link https://orpc.dev/docs/middleware Middleware Docs}
31 */
32 middleware<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, TInput, TOutput = any>( // = any here is important to make middleware can be used in any output by default
33 middleware: Middleware<
34 TInitialContext,
35 UOutContext,

Callers 15

builder.test.tsFile · 0.65
builder.test-d.tsFile · 0.65
db.tsFile · 0.65
auth.tsFile · 0.65
retryFunction · 0.65
db.tsFile · 0.65
auth.tsFile · 0.65
retryFunction · 0.65
db.tsFile · 0.65

Implementers 1

Builderpackages/server/src/builder.ts

Calls

no outgoing calls

Tested by

no test coverage detected