url-parse.d.ts 710 B

123456789101112131415161718192021222324252627
  1. // Type definitions for url-parse v1.1.8
  2. // Project: https://github.com/unshiftio/url-parse
  3. // Definitions by: Steven Silvester <https://github.com/blink1073>
  4. // We use the hack mentioned in https://github.com/Microsoft/TypeScript/issues/5073
  5. // to enable `import * as urlparse from 'url-parse';`
  6. declare module 'url-parse' {
  7. interface IURL {
  8. protocol: string;
  9. slashes: boolean;
  10. auth: string;
  11. username: string;
  12. password: string;
  13. host: string;
  14. hostname: string;
  15. port: string;
  16. pathname: string;
  17. query: any;
  18. hash: string;
  19. href: string;
  20. origin: string;
  21. }
  22. function parse(url: string, parseQuery?: boolean): IURL;
  23. namespace parse { }
  24. export = parse;
  25. }