mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-05 01:30:17 +00:00
add path parse definitions
This commit is contained in:
6
path-parse/path-parse-tests.ts
Normal file
6
path-parse/path-parse-tests.ts
Normal 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
12
path-parse/path-parse.d.ts
vendored
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user