UNPKG

guarder

Version:

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

14 lines 541 B
import { Guard } from '../types/Guard'; import { Instantiable } from '../types/Instantiable'; /** * Empty Guard ensures that the property is not null or undefined. A string should contain at least one character, an * array should contain at least one item, an object should contain at least one key */ declare class EmptyGuard implements Guard { /** * @inheritDoc */ guard<T = unknown>(property: T, errorMessage?: string, error?: Instantiable<Error>): T; } export { EmptyGuard }; //# sourceMappingURL=EmptyGuard.d.ts.map