From b55b8945588635f9605c5a75a66d8b8467f8e942 Mon Sep 17 00:00:00 2001 From: vvakame Date: Mon, 12 Jan 2015 11:19:59 +0900 Subject: [PATCH] add which/which.d.ts --- which/which-tests.ts | 10 ++++++++++ which/which.d.ts | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 which/which-tests.ts create mode 100644 which/which.d.ts diff --git a/which/which-tests.ts b/which/which-tests.ts new file mode 100644 index 000000000..172cff91c --- /dev/null +++ b/which/which-tests.ts @@ -0,0 +1,10 @@ +/// + +import when = require("when"); + +when("cat", (err, path) => { + console.log(path); +}); + +var path = when.sync("cat"); +console.log(path); diff --git a/which/which.d.ts b/which/which.d.ts new file mode 100644 index 000000000..d25ac4fd7 --- /dev/null +++ b/which/which.d.ts @@ -0,0 +1,13 @@ +// Type definitions for which 1.0.8 +// Project: https://github.com/isaacs/node-which +// Definitions by: 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; +}