UNPKG

@lifaon/path

Version:

Useful tool to manage paths like the URL object

12 lines (11 loc) 788 B
import type { IPathSegments } from '../../../../types/segments/path-segments.type.js'; import type { IUncheckedPathSegments } from '../../../../types/segments/unchecked-path-segments.type.js'; import { IPushUncheckedSegmentIntoMutablePathSegmentsOptions } from '../mutate/push-unchecked-segment-into-mutable-path-segments.js'; export interface IConvertUncheckedPathSegmentsIntoPathSegments extends IPushUncheckedSegmentIntoMutablePathSegmentsOptions { readonly rootRegExp: RegExp; } /** * Ensures every segment from `segments` is correct and optimizes the result. * See`IPathSegments` for more details. */ export declare function convertUncheckedPathSegmentsIntoPathSegments(segments: IUncheckedPathSegments, options: IConvertUncheckedPathSegmentsIntoPathSegments): IPathSegments;