Files
Nate Cook 7191549c88 Fix for @Option(transform:) with optional type (#619)
Due to the restructuring in #477, there was ambiguity between the
unconstrained `@Option` initializer that uses a transform (but no
initial value) and the one that is constrained to the property being
optional. This marks the unconstrained version as disfavored, which
allows overload resolution to select the optional version when
appropriate.

Also fixes this for `@Argument` and improves documentation
consistency for `@Option`.

Fixes #618.
2024-03-05 11:20:13 -08:00

776 B

ArgumentParser/Option

Topics

Single-Value Options

  • init(name:parsing:help:completion:)-4yske
  • init(name:parsing:help:completion:)-7slrf
  • init(wrappedValue:name:parsing:help:completion:)-7ilku
  • init(name:parsing:help:completion:transform:)-2wf44
  • init(name:parsing:help:completion:transform:)-25g7b
  • init(wrappedValue:name:parsing:help:completion:transform:)-2llve
  • SingleValueParsingStrategy

Array Options

  • init(name:parsing:help:completion:)-238hg
  • init(name:parsing:help:completion:transform:)-74hnp
  • init(wrappedValue:name:parsing:help:completion:)-1dtbf
  • init(wrappedValue:name:parsing:help:completion:transform:)-1kpto
  • ArrayParsingStrategy

Infrequently Used APIs

  • wrappedValue