Const
import {assertWrap} from '@augment-vir/assert';
// `result1` will be `['a']`
const result1 = assertWrap.deepEquals(['a'], ['a']);
const value: unknown = 'some value' as unknown;
// `result2` will be `'some value'` and it will have the type of `string`
const result2 = assertWrap.isString(value);
const value2: unknown = 'some value' as unknown;
// this will throw an error
const result3 = assertWrap.isNumber(value2);
AssertionError When the assertion fails.
A group of guard methods that do the following:
This can also be called as a standalone assertion function which asserts that its input is truthy and returns it if so.