IFClite TypeScript API
    Preparing search index...

    Type Alias RegexEvaluator

    RegexEvaluator: (pattern: string, text: string) => Promise<RegexEvalResult>

    Evaluates a regex pattern against text and resolves with the match result. Throws (a rejected promise) on both an invalid pattern and a timeout/failure — callers don't need a separate error variant, since checkRegexExpectation's catch branch already handles a thrown new RegExp the same way either kind of failure would need to be reported.

    The default (defaultRegexEvaluator) runs new RegExp(...).test(...) synchronously in-process, which is exactly what the runner has always done — CLI and test callers get byte-identical behaviour. A host that wants the actual work to run somewhere else (e.g. the viewer running it in a Worker with a timeout, off the main UI thread) supplies its own evaluator via RunBundleTestsOptions.evaluateRegex.

    Type Declaration