forked from extern/nushell
Fix type signature of median (#9843)
Still support forming the median over homogeneous lists of `Duration` or `Filesize`. Don't advertise `list<any>` as this can become funky when given an even number of elements... Work for #9812
This commit is contained in:
parent
6a7a23e3fa
commit
99ed8e42a3
@ -18,6 +18,8 @@ impl Command for SubCommand {
|
||||
Signature::build("math median")
|
||||
.input_output_types(vec![
|
||||
(Type::List(Box::new(Type::Number)), Type::Number),
|
||||
(Type::List(Box::new(Type::Duration)), Type::Duration),
|
||||
(Type::List(Box::new(Type::Filesize)), Type::Filesize),
|
||||
(Type::Table(vec![]), Type::Record(vec![])),
|
||||
])
|
||||
.allow_variants_without_examples(true)
|
||||
|
Loading…
Reference in New Issue
Block a user