Closes https://github.com/zeit/arg/issues/30. I needed to re-use the same logic of type and array handling between the -- function and regular functions so I created the arg.of wrapper that'll automatically be used when the arg is of [Handler] type.
This feature allows someone to split -- args apart from _ by defining -- in the opts object. All changes are backward compatible with existing code and these changes do not affect the type signature since { '--': [String] } "just works" with the current TypeScript definition.
Closes https://github.com/zeit/arg/issues/30. I needed to re-use the same logic of
type
and array handling between the--
function and regular functions so I created thearg.of
wrapper that'll automatically be used when the arg is of[Handler]
type.This feature allows someone to split
--
args apart from_
by defining--
in theopts
object. All changes are backward compatible with existing code and these changes do not affect the type signature since{ '--': [String] }
"just works" with the current TypeScript definition.