overlapping
overlapping(
query,candidates,opts?):string[]
Which patterns in query overlap the candidates set, in query order —
the conflict-detection primitive.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
query | Patterns | The pattern-set to filter and return a subset of (Patterns). |
candidates | readonly string[] | The patterns to test query against for overlap. |
opts? | Options | Matching semantics (Options); defaults apply when omitted. |
Returns
Section titled “Returns”string[]
The subset of query (in query order) that overlaps some candidate.
Remarks
Section titled “Remarks”Returns a subset of the FIRST argument, query. Contrast
Matcher.overlapping, which returns a subset of ITS argument — the two
conventions filter opposite sides.
Example
Section titled “Example”const taskA = ["src/api/**", "src/db/schema.ts"];const taskB = ["src/api/routes/*.ts", "docs/**"];
overlapping(taskA, taskB); // ["src/api/**"] — the overlapping claim → predicted conflictoverlapping(["docs/**"], taskA); // [] — no overlap