UNPKG

@dishuostec/llrt-types

Version:

Type definitions for LLRT, Low Latency Runtime

59 lines (54 loc) 1.63 kB
/** * The `path` module provides utilities for working with file and directory * paths. It can be accessed using: * * ```js * import path from 'path'; * ``` */ declare module "path" { /** * A parsed path object generated by path.parse() or consumed by path.format(). */ interface ParsedPath { root: string; dir: string; base: string; ext: string; name: string; } interface FormatInputPathObject { root?: string | undefined; dir?: string | undefined; base?: string | undefined; ext?: string | undefined; name?: string | undefined; } export function normalize(path: string): string; export function join(...paths: string[]): string; export function resolve(...paths: string[]): string; export function relative(from: string, to: string): string; export function isAbsolute(path: string): boolean; export function dirname(path: string): string; export function basename(path: string, suffix?: string): string; export function extname(path: string): string; export const sep: "\\" | "/"; export const delimiter: ";" | ":"; export function parse(path: string): ParsedPath; export function format(pathObject: FormatInputPathObject): string; const _default: { basename: typeof basename; delimiter: typeof delimiter; dirname: typeof dirname; extname: typeof extname; format: typeof format; isAbsolute: typeof isAbsolute; join: typeof join; normalize: typeof normalize; parse: typeof parse; relative: typeof relative; resolve: typeof resolve; sep: typeof sep; }; export default _default; }