mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add missing shelljs configuration options (#18548)
This commit is contained in:
parent
0b2916b41e
commit
0860eda60e
23
types/shelljs/index.d.ts
vendored
23
types/shelljs/index.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
// Type definitions for ShellJS 0.7
|
||||
// Project: http://shelljs.org
|
||||
// Definitions by: Niklas Mollenhauer <https://github.com/nikeee>
|
||||
// Vojtech Jasny <https://github.com/voy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node"/>
|
||||
@ -523,6 +524,10 @@ export function touch(options: touchOptionsArray, files: string[]): void;
|
||||
|
||||
// Configuration
|
||||
|
||||
export interface GlobOptions {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface ShellConfig {
|
||||
/**
|
||||
* Suppresses all command output if true, except for echo() calls. Default is false.
|
||||
@ -536,11 +541,29 @@ export interface ShellConfig {
|
||||
*/
|
||||
fatal: boolean;
|
||||
|
||||
/**
|
||||
* Will print each executed command to the screen. Default is true.
|
||||
* @type {boolean}
|
||||
*/
|
||||
verbose: boolean;
|
||||
|
||||
/**
|
||||
* Passed to glob.sync() instead of the default options ({}).
|
||||
* @type {Object}
|
||||
*/
|
||||
globOptions: GlobOptions;
|
||||
|
||||
/**
|
||||
* Absolute path of the Node binary. Default is null (inferred).
|
||||
* @type {string|null}
|
||||
*/
|
||||
execPath: string | null;
|
||||
|
||||
/**
|
||||
* Reset shell.config to the defaults.
|
||||
* @returns {void}
|
||||
*/
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -130,5 +130,13 @@ let tmp = shell.tempdir(); // "/tmp" for most *nix platforms
|
||||
|
||||
let errorlol = shell.error();
|
||||
|
||||
shell.config.fatal = true;
|
||||
shell.config.reset();
|
||||
shell.config.silent = true;
|
||||
shell.config.fatal = true;
|
||||
shell.config.verbose = true;
|
||||
shell.config.execPath = null;
|
||||
shell.config.execPath = '/bin/node';
|
||||
shell.config.globOptions = {
|
||||
cwd: './',
|
||||
dot: true
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user