mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
shelljs: update exec for after v0.6.0 (#14143)
* shelljs: update for after v0.6.0 exec.output was changed to exec.stdout, and missing exec.stderr. stderr:74f1ff8748stdout:8a7f7ceec4* shelljs: update testcode
This commit is contained in:
parent
5efea302f3
commit
c71435a8cb
7
shelljs/index.d.ts
vendored
7
shelljs/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for ShellJS v0.3.0
|
||||
// Type definitions for ShellJS v0.6.0
|
||||
// Project: http://shelljs.org
|
||||
// Definitions by: Niklas Mollenhauer <https://github.com/nikeee>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@ -463,7 +463,7 @@ export declare function exec(command: string, options: ExecOptions, callback: Ex
|
||||
export declare function exec(command: string, callback: ExecCallback): child.ChildProcess;
|
||||
|
||||
export interface ExecCallback {
|
||||
(code: number, output: string, error?: string): any;
|
||||
(code: number, stdout: string, stderr: string): any;
|
||||
}
|
||||
|
||||
export interface ExecOptions {
|
||||
@ -473,7 +473,8 @@ export interface ExecOptions {
|
||||
|
||||
export interface ExecOutputReturnValue {
|
||||
code: number;
|
||||
output: string;
|
||||
stdout: string;
|
||||
stderr: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -86,22 +86,22 @@ var testPath = shell.env["path"];
|
||||
|
||||
import child = require("child_process");
|
||||
|
||||
var version = shell.exec("node --version").output;
|
||||
var version = shell.exec("node --version").stdout;
|
||||
|
||||
var version2 = <shell.ExecOutputReturnValue>shell.exec("node --version", { async: false });
|
||||
var output = version2.output;
|
||||
var output = version2.stdout;
|
||||
|
||||
var asyncVersion3 = <child.ChildProcess>shell.exec("node --version", { async: true });
|
||||
var pid = asyncVersion3.pid;
|
||||
|
||||
shell.exec("node --version", { silent: true }, function (code, output) {
|
||||
var version = output;
|
||||
shell.exec("node --version", { silent: true }, function (code, stdout, stderr) {
|
||||
var version = stdout;
|
||||
});
|
||||
shell.exec("node --version", { silent: true, async: true }, function (code, output) {
|
||||
var version = output;
|
||||
shell.exec("node --version", { silent: true, async: true }, function (code, stdout, stderr) {
|
||||
var version = stdout;
|
||||
});
|
||||
shell.exec("node --version", function (code, output) {
|
||||
var version = output;
|
||||
shell.exec("node --version", function (code, stdout, stderr) {
|
||||
var version = stdout;
|
||||
});
|
||||
shell.exec("node --version", function (code: number) {
|
||||
var num: number = code;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user