From db1ca04de357408a8608e777619c1a267ca10274 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 31 Jan 2018 15:31:48 -0800 Subject: [PATCH] shelljs.test uses string literals for option param Previously it was just string, which makes it hard to know which options are available. --- types/shelljs/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/shelljs/index.d.ts b/types/shelljs/index.d.ts index 8d96561a1d..d20185e829 100644 --- a/types/shelljs/index.d.ts +++ b/types/shelljs/index.d.ts @@ -97,7 +97,7 @@ export function mkdir(options: string, ...dir: Array): 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.