url.d.ts 977 B

1234567891011121314151617181920212223242526
  1. // Extracted from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1ad10bb0dd35f98e27d4d848bfe3d5dfc919e9f0/node/node.d.ts
  2. // Type definitions for Node.js v6.x
  3. // Project: http://nodejs.org/
  4. // Definitions by: Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
  5. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
  6. declare module "url" {
  7. export interface Url {
  8. href?: string;
  9. protocol?: string;
  10. auth?: string;
  11. hostname?: string;
  12. port?: string;
  13. host?: string;
  14. pathname?: string;
  15. search?: string;
  16. query?: string | any;
  17. slashes?: boolean;
  18. hash?: string;
  19. path?: string;
  20. }
  21. export function parse(urlStr: string, parseQueryString?: boolean, slashesDenoteHost?: boolean): Url;
  22. export function format(url: Url): string;
  23. export function resolve(from: string, to: string): string;
  24. }