Merge pull request #3447 from borisyankov/add-which

add which/which.d.ts
This commit is contained in:
Masahiro Wakame
2015-01-12 11:26:42 +09:00
2 changed files with 23 additions and 0 deletions

10
which/which-tests.ts Normal file
View File

@@ -0,0 +1,10 @@
/// <reference path="./which.d.ts" />
import which = require("which");
which("cat", (err, path) => {
console.log(path);
});
var path = which.sync("cat");
console.log(path);

13
which/which.d.ts vendored Normal file
View File

@@ -0,0 +1,13 @@
// Type definitions for which 1.0.8
// Project: https://github.com/isaacs/node-which
// Definitions by: vvakame <https://github.com/vvakame>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "which" {
function when (cmd: string, cb: (err: Error, path: string) => void): void;
module when {
function sync(cmd: string): string;
}
export = when;
}