declare const FEATURES_SUPPORTED_BY_JS: string[]; declare const FEATURES_POLYFILLABLE: string[]; interface RegExpFeaturesStructured { backslashes?: Set; posixBrackets?: Set; groupModifiers?: Set; possessiveQuantifiers?: Set; flagModifiers?: Set; } /** * Groups are specified as `(?` `(?<=` etc without closing bracket. * Flags are specified as `x` `i` etc * POSIX classes are specified as `[:alnum:]` etc * Possessive quantifiers are specified as `*+` etc */ type RegExpFeaturesFlat = Set; interface DetectRegexFeaturesOptions { /** * Should the function return structural result, or a flag list of strings * * @default false */ structural?: S; /** * Features set to reuse, useful if you want to pass previous features set result. * * Only work with `structural: false` */ featuresSet?: RegExpFeaturesFlat; } /** * Detect features used from regex patterns. * Useful to check if a regex is supported for a specific engine. */ declare function detectRegexFeatures(input: string | string[], options: DetectRegexFeaturesOptions): RegExpFeaturesStructured; declare function detectRegexFeatures(input: string | string[], options?: DetectRegexFeaturesOptions): RegExpFeaturesFlat; declare function detectRegexFeaturesStrcutural(patterns: string | string[]): RegExpFeaturesStructured; declare function structuralFeaturesToFlat(features: RegExpFeaturesStructured, set?: Set): RegExpFeaturesFlat; export { type DetectRegexFeaturesOptions, FEATURES_POLYFILLABLE, FEATURES_SUPPORTED_BY_JS, type RegExpFeaturesFlat, type RegExpFeaturesStructured, detectRegexFeatures, detectRegexFeaturesStrcutural, structuralFeaturesToFlat };