assertTruthy()function
assertTruthy(value: unknown, caller: AnyCaller = assertTruthy): asserts value is true
| Param | Type | |
|---|---|---|
value | unknown | The value to assert. required |
caller | AnyCaller | Function to attribute a thrown error to (defaults to assertTruthy itself). Defaults to assertTruthy |
| Return | |
|---|---|
asserts value is true |
| Throws | |
|---|---|
RequiredError | If value is falsey. |
Assert that an unknown value is truthy.