mirror of
https://github.com/nushell/nushell
synced 2024-12-26 04:53:09 +00:00
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
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue