Skip to main content

last_occurrence

Function last_occurrence 

Source
pub fn last_occurrence(parsed: &ParsedOptions, id: u16) -> Option<Occurrence>
Expand description

What: The final use of the option id, or nothing. &ParsedOptions borrows the result read-only; u16 is the identifier type of table rows. Why: Git’s variables keep what the last matching option wrote.

In TS you’d write (pseudocode):

const last = parsed.occurrences.findLast(o => o.id === id);