Skip to main content
Version: 10.x

Function: experimental_standaloneMiddleware()

experimental_standaloneMiddleware<TCtx>(): object

Type parameters

Parameter
TCtx extends {ctx: object; input: unknown; meta: object;}

Returns

create

create: <TNewParams>(fn) => MiddlewareBuilder< deriveParamsFromConfig< TConfig, TInputIn >, TNewParams >

Type parameters

Parameter
TNewParams extends ProcedureParams< AnyRootConfig, unknown, unknown, unknown, unknown, unknown, unknown, TNewParams >

Parameters

ParameterType
fnMiddlewareFunction< deriveParamsFromConfig< RootConfig< {ctx: TCtx extends {ctx: T;} ? T : object; errorShape: object; meta: TCtx extends {meta: T;} ? T : object; transformer: object;} >, TCtx extends {input: T;} ? T : unknown >, TNewParams >

Returns

MiddlewareBuilder< deriveParamsFromConfig< TConfig, TInputIn >, TNewParams >

Source

packages/server/src/core/middleware.ts:200


Generated using TypeDoc and typedoc-plugin-markdown