url.d.ts 744 B

123456789101112131415161718192021222324252627282930313233
  1. declare type ParsedUrl = {
  2. source: string;
  3. protocol: string;
  4. authority: string;
  5. userInfo: string;
  6. user: string;
  7. password: string;
  8. host: string;
  9. port: string;
  10. relative: string;
  11. path: string;
  12. directory: string;
  13. file: string;
  14. query: string;
  15. anchor: string;
  16. pathNames: Array<string>;
  17. queryKey: {
  18. [key: string]: string;
  19. };
  20. id: string;
  21. href: string;
  22. };
  23. /**
  24. * URL parser.
  25. *
  26. * @param uri - url
  27. * @param path - the request path of the connection
  28. * @param loc - An object meant to mimic window.location.
  29. * Defaults to window.location.
  30. * @public
  31. */
  32. export declare function url(uri: string | ParsedUrl, path?: string, loc?: Location): ParsedUrl;
  33. export {};