Overview
Breaking change 🚨 ! This update changes the way in which the AST node generators for type methods (i.e methods like .max
, .emoji
, .and
etc.) are accessed. They are now accessed using a .of
property instead of .t
. Examples include:
// Primitive type methods
zf.number.of.nonnegative(zf.number()) // -> z.number().nonnegative()
zf.string.of.emoji(zf.string()) // -> z.string().emoji()
zf.string.of.max(zf.string(), 10) // -> z.string().max(10)
// Shared type methods
zf.of.promise(zf.string()) // -> z.string().promise()
zf.of.or(zf.string(), zf.number()) // -> zf.string().or(zf.number())
zf.of.nullable(zf.number()) // -> zf.number().nullable()
What's changed
Full Changelog: v0.0.9...v0.0.10