/** * Errors and warnings wrapper. */ export type PreApplyMessages = { errorMessages: Array; warningMessages: Array; }; /** * Validator that is called before applying the filter and act as a stopper for the GcpFilter apply event. */ export interface PreApplyValidator { /** * Called before filter is applied. If there are errors returned the * filter won't be applied. Warning messages will not stop filter from applying. * * @param selection The current selection state of the filter that will be applied if there are no errors. * * @returns The error and warning messages to be displayed in the modifier. */ preApplyValidation?(selection: T): PreApplyMessages; }