mapping-entry.d.ts 648 B

1234567891011121314151617
  1. export interface MappingEntry {
  2. readonly pattern: string;
  3. readonly paths: ReadonlyArray<string>;
  4. }
  5. export 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. * @param absoluteBaseUrl
  14. * @param paths
  15. * @param addMatchAll
  16. */
  17. export declare function getAbsoluteMappingEntries(absoluteBaseUrl: string, paths: Paths, addMatchAll: boolean): ReadonlyArray<MappingEntry>;