shelljs.test uses string literals for option param

Previously it was just string, which makes it hard to know which options
are available.
This commit is contained in:
Nathan Shively-Sanders
2018-01-31 15:31:48 -08:00
parent 3c357a1ccf
commit db1ca04de3
+1 -1
View File
@@ -97,7 +97,7 @@ export function mkdir(options: string, ...dir: Array<string | string[]>): void;
* @param path The path.
* @return See option parameter.
*/
export function test(option: string, path: string): boolean;
export function test(option: "-b" | "-c" | "-d" | "-e" | "-f" | "-L" | "-p" | "-S", path: string): boolean;
/**
* Returns a string containing the given file, or a concatenated string containing the files if more than one file is given (a new line character is introduced between each file). Wildcard * accepted.