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
// zod schema | |
z.object({ | |
// valid if string or: | |
optional: z.string().optional(), // field not provided, or explicitly `undefined` | |
nullable: z.string().nullable(), // field explicitly `null` | |
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined` | |
}); | |
// type | |
{ |
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
myObj = this; | |
someMethod = function(){ | |
myObj.myProp; | |
} |