* Set or override the initial context. * * @see https://orpc.dev/docs/context Context Docs
()
| 78 | * @see {@link https://orpc.dev/docs/context Context Docs} |
| 79 | */ |
| 80 | $context<U extends Context>(): Builder<U & Record<never, never>, U, TInputSchema, TOutputSchema, TErrorMap, TMeta> { |
| 81 | /** |
| 82 | * We need `& Record<never, never>` to deal with `has no properties in common with type` error |
| 83 | */ |
| 84 | |
| 85 | return new Builder({ |
| 86 | ...this['~orpc'], |
| 87 | middlewares: [], |
| 88 | inputValidationIndex: fallbackConfig('initialInputValidationIndex', this['~orpc'].config.initialInputValidationIndex), |
| 89 | outputValidationIndex: fallbackConfig('initialOutputValidationIndex', this['~orpc'].config.initialOutputValidationIndex), |
| 90 | }) |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Sets or overrides the initial meta. |
no test coverage detected