mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-30 07:01:59 +00:00
docs(core): correct newtype decoding guidance (#45736)
This commit is contained in:
parent
35d681afab
commit
43c8690c14
2 changed files with 6 additions and 1 deletions
5
.changeset/correct-newtype-decoding.md
Normal file
5
.changeset/correct-newtype-decoding.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@opencode-ai/core": patch
|
||||
---
|
||||
|
||||
Correct the published Newtype documentation to recommend `Schema.decodeUnknownSync` for schema-based synchronous decoding.
|
||||
|
|
@ -41,7 +41,7 @@ export type DeepMutable<T> = T extends string | number | boolean | bigint | symb
|
|||
|
||||
/**
|
||||
* Nominal wrapper for scalar types. The class itself is a valid schema —
|
||||
* pass it directly to `Schema.decode`, `Schema.decodeEffect`, etc.
|
||||
* pass it directly to `Schema.decodeUnknownSync`, `Schema.decodeEffect`, etc.
|
||||
*
|
||||
* The runtime value remains an unwrapped primitive. `Schema.brand` supplies
|
||||
* the primitive schema behavior and constructor validation, while the class
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue