guarder
Version:
Guarder provides simple validation logic to reduce clutter with inline guard statements
14 lines • 435 B
TypeScript
import { Guard } from '../types/Guard';
import { Instantiable } from '../types/Instantiable';
/**
* Negative Guard validates a property is not a negative number
*/
declare class NegativeGuard implements Guard {
/**
* @inheritDoc
*/
guard<T = unknown>(property: T, errorMessage?: string, error?: Instantiable<Error>): T;
private throwError;
}
export { NegativeGuard };
//# sourceMappingURL=NegativeGuard.d.ts.map