UNPKG

651 BTypeScriptView Raw
1export interface MappingEntry {
2 readonly pattern: string;
3 readonly paths: ReadonlyArray<string>;
4}
5export interface Paths {
6 readonly [key: string]: ReadonlyArray<string>;
7}
8/**
9 * Converts an absolute baseUrl and paths to an array of absolute mapping entries.
10 * The array is sorted by longest prefix.
11 * Having an array with entries allows us to keep a sorting order rather than
12 * sort by keys each time we use the mappings.
13 *
14 * @param absoluteBaseUrl
15 * @param paths
16 * @param addMatchAll
17 */
18export declare function getAbsoluteMappingEntries(absoluteBaseUrl: string, paths: Paths, addMatchAll: boolean): ReadonlyArray<MappingEntry>;