import type { GherkinDocument } from '@cucumber/messages'; import type { LineageConstraints, SearchHits } from './types.js'; /** * Returns abridged copies of the given documents, with lineage constraints and search hits used * to filter out nodes that shouldn't be shown * * @param gherkinDocuments - the original documents to prune * @param constraints - the set of AST node IDs to retain, derived from pickle lineage * @param searchHits - if provided, further narrows results to nodes matching a search query * * @remarks * The two filtering mechanisms behave a little differently. * * `lineageConstraints` are strictly enforced at every level - any node of the covered types must * have its id included otherwise it will be filtered off. This check is performed eagerly at every * level so for e.g. a Rule that isn't matched, we won't even look at its child Scenarios. * * `searchHits` has cascading behaviour - a match at a higher level (Feature, Rule, or Background) * ensures all of its descendants will be retained, and a match at a lower level (Scenario, Step) * ensures all of its ascendants (but not siblings) will be retained. A `false` value means there * were no hits at all, so no documents will be returned. */ export declare function pruneGherkinDocuments(gherkinDocuments: ReadonlyArray, constraints: LineageConstraints, searchHits?: SearchHits | false): ReadonlyArray; //# sourceMappingURL=pruneGherkinDocuments.d.ts.map