Aller au contenu principal

boolean()

boolean(message?): BooleanSchema

Boolean schema with 0 overhead after tsup + Terser build.

Usage identical to before:

  • boolean()
  • boolean("Custom error")

Parameters​

message?: string​

Custom error message (optional).


Returns: BooleanSchema​

BooleanSchema


Since​

2.0.0