Const
A group of guard methods that return a boolean type guard rather than an assertion type guard.
This can also be called as a standalone check function which returns a boolean to indicate whether its input is truthy or not.
import {check} from '@augment-vir/assert';const value: unknown = 'some value' as unknown;if (check.isString(value)) { // `value` will now be typed as a `string` in here} Copy
import {check} from '@augment-vir/assert';const value: unknown = 'some value' as unknown;if (check.isString(value)) { // `value` will now be typed as a `string` in here}
A boolean (as a type guard when possible).
@augment-vir/assert
A group of guard methods that return a boolean type guard rather than an assertion type guard.
This can also be called as a standalone check function which returns a boolean to indicate whether its input is truthy or not.