From b55b8945588635f9605c5a75a66d8b8467f8e942 Mon Sep 17 00:00:00 2001 From: vvakame Date: Mon, 12 Jan 2015 11:19:59 +0900 Subject: [PATCH 1/2] 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 0000000000..172cff91c9 --- /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 0000000000..d25ac4fd7f --- /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; +} From f3617cc5229f2c9149ca4a88d420d1bcfd5462ce Mon Sep 17 00:00:00 2001 From: vvakame Date: Mon, 12 Jan 2015 11:24:20 +0900 Subject: [PATCH 2/2] fix typo... hehe :P --- which/which-tests.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/which/which-tests.ts b/which/which-tests.ts index 172cff91c9..45a376dcb3 100644 --- a/which/which-tests.ts +++ b/which/which-tests.ts @@ -1,10 +1,10 @@ /// -import when = require("when"); +import which = require("which"); -when("cat", (err, path) => { +which("cat", (err, path) => { console.log(path); }); -var path = when.sync("cat"); +var path = which.sync("cat"); console.log(path);