/** * A highly professional utility to convert GLOB patterns into JavaScript RegExp objects, * and decompile them back into GLOB strings. * * Supports standard features: '*', '**', '?', '[...]', '[!...]', '{a,b}', and '\' escaping. */ /** * Compiles a GLOB string pattern into a RegExp object. * * @param {string|string[]} globData - The GLOB pattern to compile. * @property {boolean} [strict=true] - If true, throws SyntaxError on unbalanced brackets or braces. * @returns {string[]} The resulting regular expression parsed into string array. * @throws {TypeError} If globPattern or flags are not strings. * @throws {SyntaxError} If the pattern has unmatched groups and strict mode is enabled. */ export declare const compileGlob: (globData: string | string[], strict?: boolean) => string[]; /** * Compiles a GLOB string pattern into a RegExp object. * * @param {string} globPattern - The GLOB pattern to compile. * @param {string} [flags=''] - Optional RegExp flags (e.g., 'i', 'g', 'm'). * @property {boolean} [strict=true] - If true, throws SyntaxError on unbalanced brackets or braces. * @returns {RegExp} The resulting regular expression. * @throws {TypeError} If globPattern or flags are not strings. * @throws {SyntaxError} If the pattern has unmatched groups and strict mode is enabled. */ export declare const compileGlobRegExp: (globPattern: string, flags?: string, strict?: boolean) => RegExp; /** * Decompiles a glob data back into a GLOB string pattern. * Note: This method is designed specifically for values generated by this file compiler method. * * @param {RegExp|string|string[]} regexp - The regular expression to decompile. * @returns {string[]} The reconstructed GLOB pattern. * @throws {TypeError} If the argument is not a valid RegExp instance or string. */ export declare const decompileGlob: (regexp: RegExp | string | string[]) => string[]; /** * Validates if a given pattern is a syntactically correct GLOB string. * * @param {string|string[]} globPattern - The pattern to validate. * @returns {boolean} True if the pattern is syntactically valid, false otherwise. * @throws {TypeError} If the input is not a string or an array of strings. */ export declare const isValidGlob: (globPattern: string | string[]) => boolean; //# sourceMappingURL=Glob.d.mts.map