[shell-escape]: Add types (#19449)

This commit is contained in:
Miloslav Nenadál
2017-08-31 01:56:11 +02:00
committed by Mohamed Hegazy
parent ed8dad43c5
commit 1939d342ec
4 changed files with 38 additions and 0 deletions

10
types/shell-escape/index.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
// Type definitions for shell-escape 0.2
// Project: https://github.com/xxorax/node-shell-escape
// Definitions by: Miloslav Nenadál <https://github.com/nenadalm>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
type ShellEscape = (a: string[]) => string;
declare const shellEscape: ShellEscape;
export = shellEscape;

View File

@@ -0,0 +1,5 @@
import * as shellEscape from 'shell-escape';
() => {
const stringRes = shellEscape(['cp', '-r', 'src/', 'dest/']);
};

View File

@@ -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"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }