@mastra/core
Version:
19 lines • 954 B
TypeScript
import { MastraError } from '../../error/index.js';
/** Thrown when a schema regex uses syntax the linear-time engine cannot run (e.g. lookarounds, backreferences) */
export declare class UnsupportedSchemaPatternError extends MastraError {
readonly pattern: string;
constructor(pattern: string, reason: string);
}
/** Rewrite ECMA-262 escapes that RE2 spells differently (`\uXXXX`, `\u{X}`, `\cX`) to RE2's `\x{...}` form */
export declare function toRe2Source(source: string): string;
/**
* RegExp whose matching runs on RE2 (linear time) instead of V8's backtracking engine.
* Subclasses RegExp so zod's `.regex()` and `String.prototype.match` accept it; all
* built-in matching methods route through the overridden `exec`.
*/
export declare class SafeRegExp extends RegExp {
#private;
constructor(pattern: string | RegExp, flags?: string);
exec(input: string): RegExpExecArray | null;
}
//# sourceMappingURL=safe-regex.d.ts.map