mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
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
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue