findBracketMatchAtCaret
findBracketMatchAtCaret(
brackets,caretOffset,scanBudget?):BracketMatch|null
Matching bracket pair for a caret, or null when the caret touches no bracket, the partner is missing, or the source is unbalanced at that point.
Brackets come from the syntax worker, so string and comment contents are already excluded — the reason this is not a text scan.
Parameters
Section titled “Parameters”brackets
Section titled “brackets”readonly BracketInfo[]
caretOffset
Section titled “caretOffset”number
scanBudget?
Section titled “scanBudget?”number
Returns
Section titled “Returns”BracketMatch | null