normalize-page-path.d.ts 451 B

12345678910
  1. /**
  2. * Takes a page and transforms it into its file counterpart ensuring that the
  3. * output is normalized. Note this function is not idempotent because a page
  4. * `/index` can be referencing `/index/index.js` and `/index/index` could be
  5. * referencing `/index/index/index.js`. Examples:
  6. * - `/` -> `/index`
  7. * - `/index/foo` -> `/index/index/foo`
  8. * - `/index` -> `/index/index`
  9. */
  10. export declare function normalizePagePath(page: string): string;