You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Initial Configuration
Customize the initial input schema using `.$input`:
```ts
const base = os.$input(z.void())
const base = os.$input<Schema<void, unknown>>()
```
Unlike `.input`, the `.$input` method lets you redefine the input schema
after its initial configuration. This is useful when you need to enforce
a `void` input when no `.input` is specified.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added enhanced input configuration capability, allowing users to
flexibly redefine their initial input schema.
- **Documentation**
- Clarified configuration terminology by renaming "Default
Configuration" to "Initial Configuration."
- Introduced a new section with practical examples to guide users in
customizing input schemas.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: apps/content/docs/procedure.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,17 @@ const example = os
69
69
70
70
To learn more, see the [Middleware](/docs/middleware) documentation.
71
71
72
+
## Initial Configuration
73
+
74
+
Customize the initial input schema using `.$input`:
75
+
76
+
```ts
77
+
const base =os.$input(z.void())
78
+
const base =os.$input<Schema<void, unknown>>()
79
+
```
80
+
81
+
Unlike `.input`, the `.$input` method lets you redefine the input schema after its initial configuration. This is useful when you need to enforce a `void` input when no `.input` is specified.
82
+
72
83
## Reusability
73
84
74
85
Each modification to a builder creates a completely new instance, avoiding reference issues. This makes it easy to reuse and extend procedures efficiently.
): DecoratedMiddleware<TCurrentContext,UOutContext,TInput,TOutput,ORPCErrorConstructorMap<any>,TMeta>{// ORPCErrorConstructorMap<any> ensures middleware can used in any procedure
0 commit comments