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

convert

inline fun <T : Any> RawArgument.convert(crossinline conversion: ArgValueTransformer<T>): ProcessedArgument<T, T>

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.