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

Method output

packages/server/src/builder.ts:258–266  ·  view source on GitHub ↗

* Defines the output validation schema. * * @see https://orpc.dev/docs/procedure#input-output-validation Output Validation Docs

(
    schema: USchema,
  )

Source from the content-addressed store, hash-verified

256 * @see {@link https://orpc.dev/docs/procedure#input-output-validation Output Validation Docs}
257 */
258 output<USchema extends AnySchema>(
259 schema: USchema,
260 ): ProcedureBuilderWithOutput<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta> {
261 return new Builder({
262 ...this['~orpc'],
263 outputSchema: schema,
264 outputValidationIndex: fallbackConfig('initialOutputValidationIndex', this['~orpc'].config.initialOutputValidationIndex) + this['~orpc'].middlewares.length,
265 }) as any
266 }
267
268 /**
269 * Defines the handler of the procedure.

Callers

nothing calls this directly

Calls 1

fallbackConfigFunction · 0.90

Tested by

no test coverage detected