mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
add path parse definitions
This commit is contained in:
@@ -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;
|
||||
Vendored
+12
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user