export type RegExpCompiler = (s: string) => RegExp; export declare const hasStickyRegexp: boolean; /** * Generic constructor for mixins. */ type Constructor = new (...args: any[]) => T; /** * Interface ensures relevant properties / methods are visible to matcher mixins. */ export interface MatcherProps { str: string; matchEnd: number; start: number; end: number; compile(str: string): RegExp; } /** * Matcher code that uses substring / global RegExp flag. */ export declare const GlobalMatcherMixin: >(Base: T) => { new (...args: any[]): { /** * Compile a regular expression using the global flag. */ compile(s: string): RegExp; /** * Attempt to match a pattern. If the pattern matches, set the matchEnd * pointer and return the matched string. Otherwise return null. */ match(pattern: RegExp, i: number): string | null; /** * Test the pattern at the given index and return true if it matched. */ test(pattern: RegExp, start: number): boolean; str: string; matchEnd: number; start: number; end: number; }; } & T; /** * Matcher code that uses sticky RegExp flag. */ export declare const StickyMatcherMixin: >(Base: T) => { new (...args: any[]): { /** * Compile a regular expression using the sticky flag. */ compile(s: string): RegExp; /** * Attempt to match a pattern. If the pattern matches, set the matchEnd * pointer and return the matched string. Otherwise return null. */ match(pattern: RegExp, i: number): string | null; /** * Test the pattern at the given index and return true if it matched. */ test(pattern: RegExp, i: number): boolean; str: string; matchEnd: number; start: number; end: number; }; } & T; export {};