clikt / com.github.ajalt.clikt.parameters.arguments / convert

convert

inline fun Any> RawArgument.convert(completionCandidates: CompletionCandidates = completionCandidatesWithDefault.default, crossinline conversion: ArgValueTransformer): ProcessedArgument

Convert the argument’s values.

The conversion is called once for each value given. If any errors are thrown, they are caught and a BadParameterValue is thrown with the error message. You can call fail to throw a BadParameterValue manually.

Parameters

completionCandidates - candidates to use when completing this argument in shell autocomplete, if no candidates are specified in argument