From f8bbd7428a2d5221eceb5b8a5bee063cb0b12c91 Mon Sep 17 00:00:00 2001 From: Dan Chao Date: Wed, 16 Mar 2016 22:22:50 -0700 Subject: [PATCH] add path parse definitions --- path-parse/path-parse-tests.ts | 6 ++++++ path-parse/path-parse.d.ts | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 path-parse/path-parse-tests.ts create mode 100644 path-parse/path-parse.d.ts diff --git a/path-parse/path-parse-tests.ts b/path-parse/path-parse-tests.ts new file mode 100644 index 0000000000..05c583ca31 --- /dev/null +++ b/path-parse/path-parse-tests.ts @@ -0,0 +1,6 @@ +/// + +import * as parse from "path-parse"; + +const parsed = parse("/foo/bar.img"); +const { root, dir, base, ext, name } = parsed; diff --git a/path-parse/path-parse.d.ts b/path-parse/path-parse.d.ts new file mode 100644 index 0000000000..5db8fc9d1d --- /dev/null +++ b/path-parse/path-parse.d.ts @@ -0,0 +1,12 @@ +// Type definitions for path-parse v1.0.5 +// Project: https://github.com/jbgutierrez/path-parse +// Definitions by: Dan Chao + +declare module "path-parse" { + import { ParsedPath } from "path"; + const parse: (src: string) => ParsedPath; + export = parse; +}