From 510afdf330a4340cdf279a03d363ecaf0c4e708d Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sat, 21 Nov 2015 20:26:06 +0900 Subject: [PATCH] Add absolute.d.ts --- absolute/absolute-tests.ts | 5 +++++ absolute/absolute.d.ts | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 absolute/absolute-tests.ts create mode 100644 absolute/absolute.d.ts diff --git a/absolute/absolute-tests.ts b/absolute/absolute-tests.ts new file mode 100644 index 000000000..5c2514450 --- /dev/null +++ b/absolute/absolute-tests.ts @@ -0,0 +1,5 @@ +/// + +import absolute from 'absolute'; + +const x: boolean = absolute('/home/foo'); diff --git a/absolute/absolute.d.ts b/absolute/absolute.d.ts new file mode 100644 index 000000000..c0e8e9bd6 --- /dev/null +++ b/absolute/absolute.d.ts @@ -0,0 +1,13 @@ +// Type definitions for absolute 0.0.1 +// Project: https://github.com/bahamas10/node-absolute +// Definitions by: Aya Morisawa +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "absolute" { + /** + * Test if a path is absolute + */ + function absolute(path: string): boolean; + + export default absolute; +}