init(name:parsing:help:completion:)

Creates an optional property that reads its value from a labeled option.

Option.swift:557
init<T>(name: NameSpecification = .long, parsing parsingStrategy: SingleValueParsingStrategy = .next, help: ArgumentHelp? = nil, completion: CompletionKind? = nil) where Value == T?, T : ExpressibleByArgument

Parameters

name

A specification for what names are allowed for this option.

parsingStrategy

The behavior to use when looking for this option’s value.

help

Information about how to use this option.

completion

The type of command-line completion provided for this option.

This initializer is used when you declare an @Option-attributed property with an optional type and no default value:

@Option var count: Int?