Skip to content

Commit

Permalink
feat: add meta schema
Browse files Browse the repository at this point in the history
Also:
- Make object's `properties` optional
  • Loading branch information
brettz9 committed Jun 28, 2024
1 parent 3cbb3ac commit 03030af
Show file tree
Hide file tree
Showing 5 changed files with 958 additions and 192 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/schema.zodex
2 changes: 1 addition & 1 deletion src/dezerialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ const dezerializers = {
object: ((shape: SzObject, opts: DezerializerOptions) => {
let i = z.object(
Object.fromEntries(
Object.entries(shape.properties).map(([key, value]) => {
Object.entries(shape.properties ?? {}).map(([key, value]) => {
return [
key,
checkRef(value, opts) ||
Expand Down
Loading

0 comments on commit 03030af

Please sign in to comment.