Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/parse-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Installation
npm install --save @types/parse-path
Summary
This package contains type definitions for parse-path (https://github.com/IonicaBizau/parse-path).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-path.
index.d.ts
// Type definitions for parse-path 6.0
// Project: https://github.com/IonicaBizau/parse-path
// Definitions by: Florian Keller <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace parsePath {
type Protocol = 'http' | 'https' | 'ssh' | 'file' | 'git';
interface ParsedPath {
/** The url hash. */
hash: string;
/** The url domain (including subdomain and port). */
host: string;
/** The input url. */
href: string;
/**
* @default ''
*/
password: string;
/** The url pathname. */
pathname: string;
/**
* The domain port.
* @default ''
*/
port: string;
/** The first protocol, `"ssh"` (if the url is a ssh url) or `"file"`. */
protocol: Protocol;
/** An array with the url protocols (usually it has one element). */
protocols: Protocol[];
/** The url querystring, parsed as object. */
query: Record<string, string>;
/** The url domain (including subdomains). */
resource: string;
/** The url querystring value. */
search: string;
/** The authentication user (usually for ssh urls). */
user: string;
}
}
declare function parsePath(url: string): parsePath.ParsedPath;
export = parsePath;
Additional Details
- Last updated: Mon, 15 Aug 2022 21:02:37 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Florian Keller.