mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
improve node.d.ts child_process definitions
This commit is contained in:
@@ -13,7 +13,7 @@ if (process.argv.slice(2)[0] === 'completion') {
|
||||
if (/^-\w?/.test(data.last)) return tabtab.log(['n', 'o', 'd', 'e'], data, '-');
|
||||
tabtab.log(['list', 'of', 'commands'], data);
|
||||
|
||||
child_process.exec('rake -H', function(err, stdout, stderr) {
|
||||
child_process.exec('rake -H', {encoding: null as string}, function(err, stdout, stderr) {
|
||||
if (err) return;
|
||||
var decoder = new string_decoder.StringDecoder('utf8');
|
||||
var parsed = tabtab.parseOut(decoder.write(stdout));
|
||||
@@ -21,7 +21,7 @@ if (process.argv.slice(2)[0] === 'completion') {
|
||||
if (/^-\w?/.test(data.last)) return tabtab.log(parsed.shorts, data, '-');
|
||||
});
|
||||
|
||||
child_process.exec('cake', function(err, stdout, stderr) {
|
||||
child_process.exec('cake', {encoding: null as string}, function(err, stdout, stderr) {
|
||||
if (err) return;
|
||||
var decoder = new string_decoder.StringDecoder('utf8');
|
||||
var tasks = tabtab.parseTasks(decoder.write(stdout), 'cake');
|
||||
|
||||
Reference in New Issue
Block a user