/** * How a `validation.pattern` is enforced on the rendered input. * * Browsers compile the `pattern` attribute as `^(?:pattern)$` with the `v` * flag and silently ignore it when that fails, which would drop the constraint * altogether. Patterns that are valid `v`-mode regexes are left to the browser * (`patternMismatch`); anything else that still compiles as a plain JS regex is * matched by the component and reported through `setCustomValidity`. */ export type CompiledPattern = { mode: "native"; } | { mode: "custom"; regex: RegExp; }; export declare function compilePattern(pattern: string | null | undefined): CompiledPattern | null;