Rest
...args: any[]Rest
...args: unknown[]const isPositive = (n: number) => n >= 0
assertThat(-5, isPositive)
//=> throws ValidationError: Expected 'isPositive' to be 'true' for input: '-5'
assertThat(5, isPositive, false)
//=> throws ValidationError: Expected 'isPositive' to be 'false' for input: '5'
Generated using TypeDoc
Type assertion that syntactically reads like prose. It uses the name of the validation function to produce the error message.