guarder
Version:
Guarder provides simple validation logic to reduce clutter with inline guard statements
12 lines • 370 B
TypeScript
import { Instantiable } from './Instantiable';
/**
* Guards represent specific validation mechanisms
*/
interface Guard {
/**
* Validate that the property passes pre-determined criteria or throw an error
*/
guard<T = unknown>(property: T, errorMessage?: string, error?: Instantiable<Error>): T;
}
export { Guard };
//# sourceMappingURL=Guard.d.ts.map