Skip to content

v0.0.10

Latest
Compare
Choose a tag to compare
@rexfordessilfie rexfordessilfie released this 15 Apr 22:20
5d6f04e

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

  • Better README (#13)
  • Access type methods with of (#14)
  • Reduce dts size (#15)

Full Changelog: v0.0.9...v0.0.10