Skip to content

Commit

Permalink
Fix example code in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrause committed Sep 13, 2024
1 parent 4eaa25a commit b447cef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ type _CategoryEncoded = {
};
export const Category = S.Struct({
name: S.String,
subcategories: S.optional(
S.Record(
S.String,
S.suspend((): S.Schema<_Category, _CategoryEncoded> => Category),
),
subcategories: S.optionalWith(
S.Record({
key: S.String,
value: S.suspend((): S.Schema<_Category, _CategoryEncoded> => Category),
}),
{
default: () => ({}),
},
Expand All @@ -180,7 +180,7 @@ export const User = S.Struct({
* - AUDITOR: Read only permissions
*/
role: S.Literal('ADMIN', 'USER', 'AUDITOR'), // The user's role within the system.
interests: S.optional(S.Array(Category), {
interests: S.optionalWith(S.Array(Category), {
default: () => [],
}),
}).annotations({ identifier: 'User' });
Expand Down

0 comments on commit b447cef

Please sign in to comment.