add path parse definitions

This commit is contained in:
Dan Chao
2016-03-16 22:22:50 -07:00
parent 2f47c75835
commit f8bbd7428a
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
/// <reference path="./path-parse.d.ts"/>
import * as parse from "path-parse";
const parsed = parse("/foo/bar.img");
const { root, dir, base, ext, name } = parsed;

12
path-parse/path-parse.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
// Type definitions for path-parse v1.0.5
// Project: https://github.com/jbgutierrez/path-parse
// Definitions by: Dan Chao <http://dchao.co
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts"/>
declare module "path-parse" {
import { ParsedPath } from "path";
const parse: (src: string) => ParsedPath;
export = parse;
}