UNPKG

guarder

Version:

Guarder provides simple validation logic to reduce clutter with inline guard statements

13 lines 425 B
import { Guard } from '../types/Guard'; import { Instantiable } from '../types/Instantiable'; /** * Falsy Guard ensures that the property does not evaluate to false in a type coercion */ declare class FalsyGuard implements Guard { /** * @inheritDoc */ guard<T = unknown>(property: T, errorMessage?: string, error?: Instantiable<Error>): T; } export { FalsyGuard }; //# sourceMappingURL=FalsyGuard.d.ts.map