Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / protobufjs / node_modules / @types / node / url.d.ts
diff --git a/legacy-libs/protobufjs/node_modules/@types/node/url.d.ts b/legacy-libs/protobufjs/node_modules/@types/node/url.d.ts
new file mode 100644 (file)
index 0000000..2490c35
--- /dev/null
@@ -0,0 +1,110 @@
+declare module "url" {
+    import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
+
+    // Input to `url.format`
+    interface UrlObject {
+        auth?: string | null;
+        hash?: string | null;
+        host?: string | null;
+        hostname?: string | null;
+        href?: string | null;
+        pathname?: string | null;
+        protocol?: string | null;
+        search?: string | null;
+        slashes?: boolean | null;
+        port?: string | number | null;
+        query?: string | null | ParsedUrlQueryInput;
+    }
+
+    // Output of `url.parse`
+    interface Url {
+        auth: string | null;
+        hash: string | null;
+        host: string | null;
+        hostname: string | null;
+        href: string;
+        path: string | null;
+        pathname: string | null;
+        protocol: string | null;
+        search: string | null;
+        slashes: boolean | null;
+        port: string | null;
+        query: string | null | ParsedUrlQuery;
+    }
+
+    interface UrlWithParsedQuery extends Url {
+        query: ParsedUrlQuery;
+    }
+
+    interface UrlWithStringQuery extends Url {
+        query: string | null;
+    }
+
+    function parse(urlStr: string): UrlWithStringQuery;
+    function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
+    function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
+    function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
+
+    function format(URL: URL, options?: URLFormatOptions): string;
+    function format(urlObject: UrlObject | string): string;
+    function resolve(from: string, to: string): string;
+
+    function domainToASCII(domain: string): string;
+    function domainToUnicode(domain: string): string;
+
+    /**
+     * This function ensures the correct decodings of percent-encoded characters as
+     * well as ensuring a cross-platform valid absolute path string.
+     * @param url The file URL string or URL object to convert to a path.
+     */
+    function fileURLToPath(url: string | URL): string;
+
+    /**
+     * This function ensures that path is resolved absolutely, and that the URL
+     * control characters are correctly encoded when converting into a File URL.
+     * @param url The path to convert to a File URL.
+     */
+    function pathToFileURL(url: string): URL;
+
+    interface URLFormatOptions {
+        auth?: boolean;
+        fragment?: boolean;
+        search?: boolean;
+        unicode?: boolean;
+    }
+
+    class URL {
+        constructor(input: string, base?: string | URL);
+        hash: string;
+        host: string;
+        hostname: string;
+        href: string;
+        readonly origin: string;
+        password: string;
+        pathname: string;
+        port: string;
+        protocol: string;
+        search: string;
+        readonly searchParams: URLSearchParams;
+        username: string;
+        toString(): string;
+        toJSON(): string;
+    }
+
+    class URLSearchParams implements Iterable<[string, string]> {
+        constructor(init?: URLSearchParams | string | NodeJS.Dict<string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
+        append(name: string, value: string): void;
+        delete(name: string): void;
+        entries(): IterableIterator<[string, string]>;
+        forEach(callback: (value: string, name: string, searchParams: this) => void): void;
+        get(name: string): string | null;
+        getAll(name: string): string[];
+        has(name: string): boolean;
+        keys(): IterableIterator<string>;
+        set(name: string, value: string): void;
+        sort(): void;
+        toString(): string;
+        values(): IterableIterator<string>;
+        [Symbol.iterator](): IterableIterator<[string, string]>;
+    }
+}