mirror of
https://github.com/nushell/nushell
synced 2024-12-26 04:53:09 +00:00
Add explicit input types for vectorized into int
form (#9741)
# Description Don't just use `List<Any>`, be precise for the vectorized form as well. # User-Facing Changes More explicit albeit verbose type information in the signature
This commit is contained in:
parent
79359598db
commit
4dbdb1fe54
1 changed files with 25 additions and 1 deletions
|
@ -37,9 +37,33 @@ impl Command for SubCommand {
|
|||
// Unix timestamp in nanoseconds
|
||||
(Type::Date, Type::Int),
|
||||
(Type::Duration, Type::Int),
|
||||
// TODO: Users should do this by dividing a Filesize by a Filesize explicitly
|
||||
(Type::Filesize, Type::Int),
|
||||
(Type::Table(vec![]), Type::Table(vec![])),
|
||||
(
|
||||
Type::List(Box::new(Type::String)),
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
(
|
||||
Type::List(Box::new(Type::Number)),
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
(
|
||||
Type::List(Box::new(Type::Bool)),
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
(
|
||||
Type::List(Box::new(Type::Date)),
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
(
|
||||
Type::List(Box::new(Type::Duration)),
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
(
|
||||
Type::List(Box::new(Type::Filesize)),
|
||||
Type::List(Box::new(Type::Int)),
|
||||
),
|
||||
// Relaxed case to support heterogeneous lists
|
||||
(
|
||||
Type::List(Box::new(Type::Any)),
|
||||
Type::List(Box::new(Type::Int)),
|
||||
|
|
Loading…
Reference in a new issue