Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/third_party/closure-compiler/node-externs/url.js
6172 views
1
/*
2
* Copyright 2012 The Closure Compiler Authors.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
/**
18
* @fileoverview Definitions for node's url module.
19
* @see http://nodejs.org/api/url.html
20
* @see https://github.com/joyent/node/blob/master/lib/url.js
21
* @externs
22
* @author Daniel Wirtz <[email protected]>
23
*/
24
25
/**
26
BEGIN_NODE_INCLUDE
27
var url = require('url');
28
END_NODE_INCLUDE
29
*/
30
31
/**
32
* @type {Object.<string,*>}
33
* @suppress {duplicate}
34
*/
35
var url = {};
36
37
/**
38
* @typedef {{href: ?string, protocol: ?string, host: ?string, auth: ?string, hostname: ?string, port: ?string, pathname: ?string, search: ?string, path: ?string, query: ?string, hash: ?string}}
39
*/
40
url.URL;
41
42
/**
43
* @param {string} urlStr
44
* @param {boolean=} parseQueryString
45
* @param {boolean=} slashesDenoteHost
46
* @return {url.URL}
47
* @nosideeffects
48
*/
49
url.parse = function(urlStr, parseQueryString, slashesDenoteHost) {};
50
51
/**
52
* @param {url.URL} urlObj
53
* @return {string}
54
* @nosideeffects
55
*/
56
url.format = function(urlObj) {};
57
58
/**
59
* @param {string} from
60
* @param {string} to
61
* @return {string}
62
* @nosideeffects
63
*/
64
url.resolve = function(from, to) {};
65
66
/**
67
* @param {url.URL|string} url
68
* @return {string}
69
*/
70
url.fileURLToPath = function(url) {};
71
72
/**
73
* @param {string} path
74
* @return {url.URL}
75
*/
76
url.pathToFileURL = function(path) {};
77
78