forked from extern/nushell
Fix signature for math abs
(#9844)
This only supports number or duration Make sure duration still works with the stricter type system Work for #9812
This commit is contained in:
parent
99ed8e42a3
commit
ff8c3aa356
@ -14,10 +14,15 @@ impl Command for SubCommand {
|
|||||||
Signature::build("math abs")
|
Signature::build("math abs")
|
||||||
.input_output_types(vec![
|
.input_output_types(vec![
|
||||||
(Type::Number, Type::Number),
|
(Type::Number, Type::Number),
|
||||||
|
(Type::Duration, Type::Duration),
|
||||||
(
|
(
|
||||||
Type::List(Box::new(Type::Number)),
|
Type::List(Box::new(Type::Number)),
|
||||||
Type::List(Box::new(Type::Number)),
|
Type::List(Box::new(Type::Number)),
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
Type::List(Box::new(Type::Duration)),
|
||||||
|
Type::List(Box::new(Type::Duration)),
|
||||||
|
),
|
||||||
])
|
])
|
||||||
.allow_variants_without_examples(true)
|
.allow_variants_without_examples(true)
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
|
Loading…
Reference in New Issue
Block a user