UNPKG

804 BTypeScriptView Raw
1export interface ValidationError {
2 message: string;
3}
4export declare type ValidationResult = void | ValidationError;
5export declare function isValidationError(vr: ValidationResult): vr is ValidationError;
6/**
7 * Interface optionally implemented by parameters objects--whether HandleCommand
8 * instances or external objects--to perform any binding logic and validate their parameters.
9 * Allows returning a promise so that implementations can perform network calls etc
10 * to validate. Simply return void if binding without validation.
11 */
12export interface SmartParameters {
13 bindAndValidate(): ValidationResult | Promise<ValidationResult>;
14}
15export declare function isSmartParameters(a: any): a is SmartParameters;
16export declare class NoParameters {
17}
18//# sourceMappingURL=SmartParameters.d.ts.map
\No newline at end of file