if (!is_bare_list(dots)) {
stop_input_type(dots, "a list")
}
if (!is_named(dots)) {
cli::cli_abort(
"All components of {.arg ...} must be named.",
call = error_call
)
}
type_ok <- map_lgl(dots, function(x) is_atomic(x) || is.null(x))
if (any(!type_ok)) {
cli::cli_abort(
"All elements of {.code ...} must be either an atomic vector or NULL."
)
}
Something that could replace code like this: