init(name:parsing:help:completion:)

Creates a required array property that reads its values from zero or more labeled options.

Option.swift:775
init<T>(name: NameSpecification = .long, parsing parsingStrategy: ArrayParsingStrategy = .singleValue, 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 parsing the elements for this option.

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 array property without a default value:

@Option(name: .customLong("char"))
var chars: [Character]