mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:55:40 +02:00
Add more input/output type annotations (#7532)
This commit is contained in:
committed by
GitHub
parent
d27263af97
commit
4e1f94026c
@ -1,7 +1,7 @@
|
||||
use nu_engine::get_full_help;
|
||||
use nu_protocol::ast::Call;
|
||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||
use nu_protocol::{Category, IntoPipelineData, PipelineData, ShellError, Signature, Value};
|
||||
use nu_protocol::{Category, IntoPipelineData, PipelineData, ShellError, Signature, Type, Value};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct From;
|
||||
@ -16,7 +16,9 @@ impl Command for From {
|
||||
}
|
||||
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
Signature::build("from").category(Category::Formats)
|
||||
Signature::build("from")
|
||||
.category(Category::Formats)
|
||||
.input_output_types(vec![(Type::Nothing, Type::String)])
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -51,7 +51,9 @@ impl Command for FromYml {
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build("from yml").category(Category::Formats)
|
||||
Signature::build("from yml")
|
||||
.input_output_types(vec![(Type::String, Type::Any)])
|
||||
.category(Category::Formats)
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
|
Reference in New Issue
Block a user