export type ValidityAndMessage = { /** * The validity flags. */ validity: ValidityStateFlags; /** * The validation message for the associated flags. It may not be an empty * string if any of the validity flags are `true`. */ validationMessage: string; }; /** * A class that computes and caches `ValidityStateFlags` for a component with * a given `State` interface. * * Cached performance before computing validity is important since constraint * validation must be checked frequently and synchronously when properties * change. * * @template State The expected interface of properties relevant to constraint * validation. */ declare abstract class Validator { private _prevState?; private _currentValidity; private readonly _getCurrentState; /** * @param getCurrentState A callback that returns the current state of * constraint validation-related properties. */ constructor(getCurrentState: () => State); /** * Returns the current `ValidityStateFlags` and validation message for the * validator. * * If the constraint validation state has not changed, this will return a * cached result. This is important since `getValidity()` can be called * frequently in response to synchronous property changes. */ getValidity(): ValidityAndMessage; /** * Computes the `ValidityStateFlags` and validation message for a given set * of constraint validation properties. * * Implementations can use platform elements like `` and `