UNPKG

@lifaon/path

Version:

Useful tool to manage paths like the URL object

10 lines (9 loc) 570 B
import type { IMutablePathSegments } from '../../../../types/segments/mutable-path-segments.type.js'; import type { IPathSegment } from '../../../../types/segments/segment/path-segment.type.js'; export interface IForcePathSegmentsAsAbsoluteOptions { readonly rootRegExp: RegExp; } /** * Converts a relative path to an absolute path, by appending `rootSegment` at the beginning of the path. */ export declare function forcePathSegmentsAsAbsolute(segments: IMutablePathSegments, rootSegment: IPathSegment, { rootRegExp }: IForcePathSegmentsAsAbsoluteOptions): void;