refactor(schema): normalize module patterns (#33770)

This commit is contained in:
Kit Langton 2026-06-25 17:42:22 +02:00 committed by GitHub
commit 7854f5b9f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 204 additions and 202 deletions

View file

@ -92,7 +92,7 @@ Use Effect schemas as the public contract:
- branded schemas for ids
- `Schema.Class` or `Schema.Struct` for domain data
- `Schema.TaggedErrorClass` for expected errors
- existing core helpers like `DeepMutable`, `withStatics`, and integer schemas where appropriate
- existing core helpers like `DeepMutable`, `statics`, and integer schemas where appropriate
Prefer `Info` objects as the stored domain records. Add static `empty(...)` constructors when update APIs need to create records on first mutation.

View file

@ -5,7 +5,7 @@
```ts
export const ID = Schema.String.pipe(
Schema.brand("ProviderV2.ID"),
withStatics((schema) => ({
statics((schema) => ({
opencode: schema.make("opencode"),
anthropic: schema.make("anthropic"),
openai: schema.make("openai"),