Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

url.d.ts 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. declare module 'url' {
  2. import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
  3. // Input to `url.format`
  4. interface UrlObject {
  5. auth?: string | null;
  6. hash?: string | null;
  7. host?: string | null;
  8. hostname?: string | null;
  9. href?: string | null;
  10. pathname?: string | null;
  11. protocol?: string | null;
  12. search?: string | null;
  13. slashes?: boolean | null;
  14. port?: string | number | null;
  15. query?: string | null | ParsedUrlQueryInput;
  16. }
  17. // Output of `url.parse`
  18. interface Url {
  19. auth: string | null;
  20. hash: string | null;
  21. host: string | null;
  22. hostname: string | null;
  23. href: string;
  24. path: string | null;
  25. pathname: string | null;
  26. protocol: string | null;
  27. search: string | null;
  28. slashes: boolean | null;
  29. port: string | null;
  30. query: string | null | ParsedUrlQuery;
  31. }
  32. interface UrlWithParsedQuery extends Url {
  33. query: ParsedUrlQuery;
  34. }
  35. interface UrlWithStringQuery extends Url {
  36. query: string | null;
  37. }
  38. /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
  39. function parse(urlStr: string): UrlWithStringQuery;
  40. /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
  41. function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
  42. /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
  43. function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
  44. /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
  45. function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
  46. function format(URL: URL, options?: URLFormatOptions): string;
  47. /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
  48. function format(urlObject: UrlObject | string): string;
  49. /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
  50. function resolve(from: string, to: string): string;
  51. function domainToASCII(domain: string): string;
  52. function domainToUnicode(domain: string): string;
  53. /**
  54. * This function ensures the correct decodings of percent-encoded characters as
  55. * well as ensuring a cross-platform valid absolute path string.
  56. * @param url The file URL string or URL object to convert to a path.
  57. */
  58. function fileURLToPath(url: string | URL): string;
  59. /**
  60. * This function ensures that path is resolved absolutely, and that the URL
  61. * control characters are correctly encoded when converting into a File URL.
  62. * @param url The path to convert to a File URL.
  63. */
  64. function pathToFileURL(url: string): URL;
  65. interface URLFormatOptions {
  66. auth?: boolean;
  67. fragment?: boolean;
  68. search?: boolean;
  69. unicode?: boolean;
  70. }
  71. class URL {
  72. constructor(input: string, base?: string | URL);
  73. hash: string;
  74. host: string;
  75. hostname: string;
  76. href: string;
  77. readonly origin: string;
  78. password: string;
  79. pathname: string;
  80. port: string;
  81. protocol: string;
  82. search: string;
  83. readonly searchParams: URLSearchParams;
  84. username: string;
  85. toString(): string;
  86. toJSON(): string;
  87. }
  88. class URLSearchParams implements Iterable<[string, string]> {
  89. constructor(init?: URLSearchParams | string | NodeJS.Dict<string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
  90. append(name: string, value: string): void;
  91. delete(name: string): void;
  92. entries(): IterableIterator<[string, string]>;
  93. forEach(callback: (value: string, name: string, searchParams: this) => void): void;
  94. get(name: string): string | null;
  95. getAll(name: string): string[];
  96. has(name: string): boolean;
  97. keys(): IterableIterator<string>;
  98. set(name: string, value: string): void;
  99. sort(): void;
  100. toString(): string;
  101. values(): IterableIterator<string>;
  102. [Symbol.iterator](): IterableIterator<[string, string]>;
  103. }
  104. }