Skip to content

Commit f1feebb

Browse files
committed
chore: readme tweaks for env docs
Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
1 parent 2eed417 commit f1feebb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,14 @@ Creates a new Zagora instance.
722722
- `.input(schema)` - Set input validation schema
723723
- `.output(schema)` - Set output validation schema
724724
- `.errors(Record<string, schema>)` - Define typed errors
725-
- `.context<T>(initial)` - Type the context with generic, and optionally set initial context
725+
- `.context<TInitialContext>(initialContext)` - Type the context with generic, and optionally set initial context
726726
- `.cache(adapter)` - Set cache adapter that should have `has`, `get`, `set`, methods
727727
- `.handler(fn)` - Set handler/procedure function
728-
- `.callable(opts?: { context?, cache? })` - Create callable procedure, context is deep merged with the initial context.
728+
- `.env(schema, processEnv?)` - Set handler/procedure function
729+
- `.callable(opts?: { context?, cache?, env? })` - Create callable procedure
730+
+ passed `context` (if any) will be deep-merged with the `initialContext` (if any)
731+
+ if `cache` passed, it will override the previously passed through `.cache` method (if so)
732+
+ if `env` passed, it will be deep-merged with the provided through the `.env` method (if so)
729733

730734
## Error Types
731735

0 commit comments

Comments
 (0)