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:
Stefan Holderbach 2023-07-28 23:32:59 +02:00 committed by GitHub
parent 99ed8e42a3
commit ff8c3aa356
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,10 +14,15 @@ impl Command for SubCommand {
Signature::build("math abs")
.input_output_types(vec![
(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::Duration)),
Type::List(Box::new(Type::Duration)),
),
])
.allow_variants_without_examples(true)
.category(Category::Math)