Merge pull request #8604 from bioball/path-parse

add path parse definitions
This commit is contained in:
Masahiro Wakame
2016-03-19 14:24:22 +09:00
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;
}