optional
fun <AllT : Any, ValueT> ProcessedArgument<AllT, ValueT>.optional(): ProcessedArgument<AllT?, ValueT>
Return null instead of throwing an error if no value is given.
This must be called after all other transforms.
Example:
val arg: Int? by argument().int().optional()
Content copied to clipboard