From e6b57c0497abd8d1db19bf54f13bf1835aa232c4 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 1 Feb 2018 08:04:55 -0800 Subject: [PATCH] Create a TestOptions type for test's options --- types/shelljs/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/shelljs/index.d.ts b/types/shelljs/index.d.ts index d20185e829..54bd3e8f9a 100644 --- a/types/shelljs/index.d.ts +++ b/types/shelljs/index.d.ts @@ -97,7 +97,9 @@ export function mkdir(options: string, ...dir: Array): void; * @param path The path. * @return See option parameter. */ -export function test(option: "-b" | "-c" | "-d" | "-e" | "-f" | "-L" | "-p" | "-S", path: string): boolean; +export function test(option: TestOptions, path: string): boolean; + +export type TestOptions = "-b" | "-c" | "-d" | "-e" | "-f" | "-L" | "-p" | "-S"; /** * 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.