-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed beta links to error handling guide
- Loading branch information
Colin McDonnell
committed
Jul 9, 2020
1 parent
5568a74
commit fd21959
Showing
3 changed files
with
43 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
// import * as z from '.'; | ||
// z.date().parse(new Date('invalid')); | ||
// // z.date().parse(new Date('invalid')); | ||
|
||
// // const myFunc = z.function(z.tuple([z.string()]), z.boolean()).implement(str => str.length > 5); | ||
|
||
// // try { | ||
// // myFunc(12 as any); | ||
// // } catch (err) { | ||
// // console.log(JSON.stringify(err, null, 2)); | ||
// // } | ||
|
||
// const $Cat = z.object({ | ||
// type: z.literal('cat'), | ||
// ability: z.literal('meow'), | ||
// }); | ||
// const $Dog = z.object({ | ||
// type: z.literal('dog'), | ||
// ability: z.literal('bark'), | ||
// }); | ||
// const $AnimalAbility = z.union([$Cat, $Dog]).distribute($A => $A.shape.ability); | ||
// type Ability = z.infer<typeof $AnimalAbility>; // "meow" | "bark" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters