diff --git a/types/shell-escape/index.d.ts b/types/shell-escape/index.d.ts new file mode 100644 index 0000000000..938cafe202 --- /dev/null +++ b/types/shell-escape/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for shell-escape 0.2 +// Project: https://github.com/xxorax/node-shell-escape +// Definitions by: Miloslav Nenadál +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type ShellEscape = (a: string[]) => string; + +declare const shellEscape: ShellEscape; + +export = shellEscape; diff --git a/types/shell-escape/shell-escape-tests.ts b/types/shell-escape/shell-escape-tests.ts new file mode 100644 index 0000000000..ac3906be19 --- /dev/null +++ b/types/shell-escape/shell-escape-tests.ts @@ -0,0 +1,5 @@ +import * as shellEscape from 'shell-escape'; + +() => { + const stringRes = shellEscape(['cp', '-r', 'src/', 'dest/']); +}; diff --git a/types/shell-escape/tsconfig.json b/types/shell-escape/tsconfig.json new file mode 100644 index 0000000000..d457fd7855 --- /dev/null +++ b/types/shell-escape/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "shell-escape-tests.ts" + ] +} diff --git a/types/shell-escape/tslint.json b/types/shell-escape/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/shell-escape/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }