Skip to content

Instantly share code, notes, and snippets.

@antoniopresto
Created February 1, 2022 01:06
Show Gist options
  • Save antoniopresto/1af674259e3f6c52fe1d5dbe8e401e6b to your computer and use it in GitHub Desktop.
Save antoniopresto/1af674259e3f6c52fe1d5dbe8e401e6b to your computer and use it in GitHub Desktop.
const userSchema = createSchema({
name: 'string?',
age: 'int',
gender: ['f', 'm', 'o'],
address: {
type: 'schema',
def: {
name: 'string',
number: [['float', 'string']],
},
},
} as const);
type Result = ReturnType<typeof userSchema.parse>
@antoniopresto
Copy link
Author

image

@antoniopresto
Copy link
Author

Screen Shot 2022-02-09 at 21 14 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment