Skip to main content

is_stated

Function is_stated 

Source
pub fn is_stated(parsed: &ParsedOptions, id: u16) -> bool
Expand description

What: Whether the option was written at all, in either form. Why: An explicit --no-only is a stated choice even though it turns the option off.

In TS you’d write (pseudocode):

const stated = parsed.occurrences.some(o => o.id === id);