Skip to content

Instantly share code, notes, and snippets.

@colinhacks
Created March 8, 2020 22:43
Show Gist options
  • Save colinhacks/5e8f99ab0b90ece7f2a5680bb38a1f39 to your computer and use it in GitHub Desktop.
Save colinhacks/5e8f99ab0b90ece7f2a5680bb38a1f39 to your computer and use it in GitHub Desktop.
const schema = yup.object({
asdf: yup.string(),
});
schema.validate({}); // passes
type SchemaType = yup.InferType<typeof schema>;
// returns { asdf: string }
// should be { asdf?: string }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment