import { NormalisedPattern } from './normalised-pattern'; import { Unreachable } from './unreachable'; /** * Computes the intersection of the two given patterns. The intersection matches a string if and only if that * string is matched by *both* given patterns. Because intersections cannot in general be expressed as a single * pattern, the result is given as an array of normalized patterns, to be interpreted as follows: * (1) An empty array. This means arguments `a` and `b` represent disjoint patterns. * That is, there are no strings that are matched by both `a` and `b`. * Example: 'foo' ∩ 'bar' = [] * (2) An array with one element. This means the intersection may be represented * by a single pattern, whose normalized pattern is contained in the array. * Example: 'a*' ∩ '*b' = ['a*b'] * (3) An array with multiple elements. The array contains a list of mutually disjoint patterns, the union * of whose matched strings are precisely those strings that are recognized by both `a` and `b`. * Example: 'test.*' ∩ '*.js' = ['test.js', 'test.*.js'] * @param {NormalisedPattern} a - lhs pattern to be intersected. * @param {NormalisedPattern} b - rhs pattern to be intersected. * @returns {NormalisedPattern} - The normalized pattern representing the intersection of `a` and `b`. */ export declare let intersect: (a: NormalisedPattern, b: NormalisedPattern, unreachable?: Unreachable) => NormalisedPattern;