id int64 0 3.78k | code stringlengths 13 37.9k | declarations stringlengths 16 64.6k |
|---|---|---|
200 | function (components:URIComponents, options:URNOptions):URNComponents {
const matches = components.path && components.path.match(URN_PARSE);
let urnComponents = components as URNComponents;
if (matches) {
const scheme = options.scheme || urnComponents.scheme || "urn";
const nid = matches[1].toLowerCase();
... | interface URNOptions extends URIOptions {
nid?:string;
} |
201 | function (components:URIComponents, options:URNOptions):URNComponents {
const matches = components.path && components.path.match(URN_PARSE);
let urnComponents = components as URNComponents;
if (matches) {
const scheme = options.scheme || urnComponents.scheme || "urn";
const nid = matches[1].toLowerCase();
... | interface URNOptions extends URIOptions {
nid?: string;
} |
202 | function (urnComponents:URNComponents, options:URNOptions):URIComponents {
const scheme = options.scheme || urnComponents.scheme || "urn";
const nid = urnComponents.nid;
const urnScheme = `${scheme}:${options.nid || nid}`;
const schemeHandler = SCHEMES[urnScheme];
if (schemeHandler) {
urnComponents = sche... | interface URNOptions extends URIOptions {
nid?:string;
} |
203 | function (urnComponents:URNComponents, options:URNOptions):URIComponents {
const scheme = options.scheme || urnComponents.scheme || "urn";
const nid = urnComponents.nid;
const urnScheme = `${scheme}:${options.nid || nid}`;
const schemeHandler = SCHEMES[urnScheme];
if (schemeHandler) {
urnComponents = sche... | interface URNOptions extends URIOptions {
nid?: string;
} |
204 | function (urnComponents:URNComponents, options:URNOptions):URIComponents {
const scheme = options.scheme || urnComponents.scheme || "urn";
const nid = urnComponents.nid;
const urnScheme = `${scheme}:${options.nid || nid}`;
const schemeHandler = SCHEMES[urnScheme];
if (schemeHandler) {
urnComponents = sche... | interface URNComponents extends URIComponents {
nid?:string;
nss?:string;
} |
205 | function (urnComponents:URNComponents, options:URNOptions):URIComponents {
const scheme = options.scheme || urnComponents.scheme || "urn";
const nid = urnComponents.nid;
const urnScheme = `${scheme}:${options.nid || nid}`;
const schemeHandler = SCHEMES[urnScheme];
if (schemeHandler) {
urnComponents = sche... | interface URNComponents extends URIComponents {
nid?: string;
nss?: string;
} |
206 | function (components:URIComponents, options:URIOptions):MailtoComponents {
const mailtoComponents = components as MailtoComponents;
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
mailtoComponents.path = undefined;
if (mailtoComponents.query) {
let unknownHe... | interface URIComponents {
scheme?:string;
userinfo?:string;
host?:string;
port?:number|string;
path?:string;
query?:string;
fragment?:string;
reference?:string;
error?:string;
} |
207 | function (components:URIComponents, options:URIOptions):MailtoComponents {
const mailtoComponents = components as MailtoComponents;
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
mailtoComponents.path = undefined;
if (mailtoComponents.query) {
let unknownHe... | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
208 | function (components:URIComponents, options:URIOptions):MailtoComponents {
const mailtoComponents = components as MailtoComponents;
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
mailtoComponents.path = undefined;
if (mailtoComponents.query) {
let unknownHe... | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
209 | function (components:URIComponents, options:URIOptions):MailtoComponents {
const mailtoComponents = components as MailtoComponents;
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
mailtoComponents.path = undefined;
if (mailtoComponents.query) {
let unknownHe... | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
210 | function (components:URIComponents, options:URIOptions):MailtoComponents {
const mailtoComponents = components as MailtoComponents;
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
mailtoComponents.path = undefined;
if (mailtoComponents.query) {
let unknownHe... | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
211 | function (components:URIComponents, options:URIOptions):MailtoComponents {
const mailtoComponents = components as MailtoComponents;
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
mailtoComponents.path = undefined;
if (mailtoComponents.query) {
let unknownHe... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
212 | function (components:URIComponents, options:URIOptions):MailtoComponents {
const mailtoComponents = components as MailtoComponents;
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
mailtoComponents.path = undefined;
if (mailtoComponents.query) {
let unknownHe... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
213 | function (components:URIComponents, options:URIOptions):MailtoComponents {
const mailtoComponents = components as MailtoComponents;
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
mailtoComponents.path = undefined;
if (mailtoComponents.query) {
let unknownHe... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
214 | function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {
const components = mailtoComponents as URIComponents;
const to = toArray(mailtoComponents.to);
if (to) {
for (let x = 0, xl = to.length; x < xl; ++x) {
const toAddr = String(to[x]);
const atIdx = toAddr.lastIndexOf("@");
... | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
215 | function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {
const components = mailtoComponents as URIComponents;
const to = toArray(mailtoComponents.to);
if (to) {
for (let x = 0, xl = to.length; x < xl; ++x) {
const toAddr = String(to[x]);
const atIdx = toAddr.lastIndexOf("@");
... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
216 | function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {
const components = mailtoComponents as URIComponents;
const to = toArray(mailtoComponents.to);
if (to) {
for (let x = 0, xl = to.length; x < xl; ++x) {
const toAddr = String(to[x]);
const atIdx = toAddr.lastIndexOf("@");
... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
217 | function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {
const components = mailtoComponents as URIComponents;
const to = toArray(mailtoComponents.to);
if (to) {
for (let x = 0, xl = to.length; x < xl; ++x) {
const toAddr = String(to[x]);
const atIdx = toAddr.lastIndexOf("@");
... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
218 | function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {
const components = mailtoComponents as URIComponents;
const to = toArray(mailtoComponents.to);
if (to) {
for (let x = 0, xl = to.length; x < xl; ++x) {
const toAddr = String(to[x]);
const atIdx = toAddr.lastIndexOf("@");
... | interface MailtoComponents extends URIComponents {
to:Array<string>,
headers?:MailtoHeaders,
subject?:string,
body?:string
} |
219 | function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {
const components = mailtoComponents as URIComponents;
const to = toArray(mailtoComponents.to);
if (to) {
for (let x = 0, xl = to.length; x < xl; ++x) {
const toAddr = String(to[x]);
const atIdx = toAddr.lastIndexOf("@");
... | interface MailtoComponents extends URIComponents {
to: Array<string>;
headers?: MailtoHeaders;
subject?: string;
body?: string;
} |
220 | function (components:URIComponents, options:URIOptions):URIComponents {
//report missing host
if (!components.host) {
components.error = components.error || "HTTP URIs must have a host.";
}
return components;
} | interface URIComponents {
scheme?:string;
userinfo?:string;
host?:string;
port?:number|string;
path?:string;
query?:string;
fragment?:string;
reference?:string;
error?:string;
} |
221 | function (components:URIComponents, options:URIOptions):URIComponents {
//report missing host
if (!components.host) {
components.error = components.error || "HTTP URIs must have a host.";
}
return components;
} | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
222 | function (components:URIComponents, options:URIOptions):URIComponents {
//report missing host
if (!components.host) {
components.error = components.error || "HTTP URIs must have a host.";
}
return components;
} | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
223 | function (components:URIComponents, options:URIOptions):URIComponents {
//report missing host
if (!components.host) {
components.error = components.error || "HTTP URIs must have a host.";
}
return components;
} | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
224 | function (components:URIComponents, options:URIOptions):URIComponents {
//report missing host
if (!components.host) {
components.error = components.error || "HTTP URIs must have a host.";
}
return components;
} | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
225 | function (components:URIComponents, options:URIOptions):URIComponents {
//report missing host
if (!components.host) {
components.error = components.error || "HTTP URIs must have a host.";
}
return components;
} | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
226 | function (components:URIComponents, options:URIOptions):URIComponents {
//report missing host
if (!components.host) {
components.error = components.error || "HTTP URIs must have a host.";
}
return components;
} | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
227 | function (components:URIComponents, options:URIOptions):URIComponents {
//report missing host
if (!components.host) {
components.error = components.error || "HTTP URIs must have a host.";
}
return components;
} | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
228 | function (components:URIComponents, options:URIOptions):URIComponents {
const secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
i... | interface URIComponents {
scheme?:string;
userinfo?:string;
host?:string;
port?:number|string;
path?:string;
query?:string;
fragment?:string;
reference?:string;
error?:string;
} |
229 | function (components:URIComponents, options:URIOptions):URIComponents {
const secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
i... | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
230 | function (components:URIComponents, options:URIOptions):URIComponents {
const secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
i... | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
231 | function (components:URIComponents, options:URIOptions):URIComponents {
const secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
i... | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
232 | function (components:URIComponents, options:URIOptions):URIComponents {
const secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
i... | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
233 | function (components:URIComponents, options:URIOptions):URIComponents {
const secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
i... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
234 | function (components:URIComponents, options:URIOptions):URIComponents {
const secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
i... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
235 | function (components:URIComponents, options:URIOptions):URIComponents {
const secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
i... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
236 | function isSecure(wsComponents:WSComponents):boolean {
return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
} | interface WSComponents extends URIComponents {
resourceName?: string;
secure?: boolean;
} |
237 | function isSecure(wsComponents:WSComponents):boolean {
return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
} | interface WSComponents extends URIComponents {
resourceName?: string;
secure?: boolean;
} |
238 | function (components:URIComponents, options:URIOptions):WSComponents {
const wsComponents = components as WSComponents;
//indicate if the secure flag is set
wsComponents.secure = isSecure(wsComponents);
//construct resouce name
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '... | interface URIComponents {
scheme?:string;
userinfo?:string;
host?:string;
port?:number|string;
path?:string;
query?:string;
fragment?:string;
reference?:string;
error?:string;
} |
239 | function (components:URIComponents, options:URIOptions):WSComponents {
const wsComponents = components as WSComponents;
//indicate if the secure flag is set
wsComponents.secure = isSecure(wsComponents);
//construct resouce name
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '... | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
240 | function (components:URIComponents, options:URIOptions):WSComponents {
const wsComponents = components as WSComponents;
//indicate if the secure flag is set
wsComponents.secure = isSecure(wsComponents);
//construct resouce name
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '... | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
241 | function (components:URIComponents, options:URIOptions):WSComponents {
const wsComponents = components as WSComponents;
//indicate if the secure flag is set
wsComponents.secure = isSecure(wsComponents);
//construct resouce name
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '... | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
242 | function (components:URIComponents, options:URIOptions):WSComponents {
const wsComponents = components as WSComponents;
//indicate if the secure flag is set
wsComponents.secure = isSecure(wsComponents);
//construct resouce name
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '... | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
243 | function (components:URIComponents, options:URIOptions):WSComponents {
const wsComponents = components as WSComponents;
//indicate if the secure flag is set
wsComponents.secure = isSecure(wsComponents);
//construct resouce name
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
244 | function (components:URIComponents, options:URIOptions):WSComponents {
const wsComponents = components as WSComponents;
//indicate if the secure flag is set
wsComponents.secure = isSecure(wsComponents);
//construct resouce name
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
245 | function (components:URIComponents, options:URIOptions):WSComponents {
const wsComponents = components as WSComponents;
//indicate if the secure flag is set
wsComponents.secure = isSecure(wsComponents);
//construct resouce name
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
246 | function (wsComponents:WSComponents, options:URIOptions):URIComponents {
//normalize the default port
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
wsComponents.port = undefined;
}
//ensure scheme matches secure flag
if (typeof wsComponents.secure === 'boolea... | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
247 | function (wsComponents:WSComponents, options:URIOptions):URIComponents {
//normalize the default port
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
wsComponents.port = undefined;
}
//ensure scheme matches secure flag
if (typeof wsComponents.secure === 'boolea... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
248 | function (wsComponents:WSComponents, options:URIOptions):URIComponents {
//normalize the default port
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
wsComponents.port = undefined;
}
//ensure scheme matches secure flag
if (typeof wsComponents.secure === 'boolea... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
249 | function (wsComponents:WSComponents, options:URIOptions):URIComponents {
//normalize the default port
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
wsComponents.port = undefined;
}
//ensure scheme matches secure flag
if (typeof wsComponents.secure === 'boolea... | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
250 | function (wsComponents:WSComponents, options:URIOptions):URIComponents {
//normalize the default port
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
wsComponents.port = undefined;
}
//ensure scheme matches secure flag
if (typeof wsComponents.secure === 'boolea... | interface WSComponents extends URIComponents {
resourceName?: string;
secure?: boolean;
} |
251 | function (wsComponents:WSComponents, options:URIOptions):URIComponents {
//normalize the default port
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
wsComponents.port = undefined;
}
//ensure scheme matches secure flag
if (typeof wsComponents.secure === 'boolea... | interface WSComponents extends URIComponents {
resourceName?: string;
secure?: boolean;
} |
252 | function serialize(components: URIComponents, options?: URIOptions): string; | interface URIComponents {
scheme?:string;
userinfo?:string;
host?:string;
port?:number|string;
path?:string;
query?:string;
fragment?:string;
reference?:string;
error?:string;
} |
253 | function serialize(components: URIComponents, options?: URIOptions): string; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
254 | function serialize(components: URIComponents, options?: URIOptions): string; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
255 | function serialize(components: URIComponents, options?: URIOptions): string; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
256 | function serialize(components: URIComponents, options?: URIOptions): string; | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
257 | function serialize(components: URIComponents, options?: URIOptions): string; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
258 | function serialize(components: URIComponents, options?: URIOptions): string; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
259 | function serialize(components: URIComponents, options?: URIOptions): string; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
260 | function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; | interface URIComponents {
scheme?:string;
userinfo?:string;
host?:string;
port?:number|string;
path?:string;
query?:string;
fragment?:string;
reference?:string;
error?:string;
} |
261 | function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
262 | function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
263 | function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
264 | function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
265 | function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
266 | function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
267 | function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
268 | function normalize(uri: URIComponents, options?: URIOptions): URIComponents; | interface URIComponents {
scheme?:string;
userinfo?:string;
host?:string;
port?:number|string;
path?:string;
query?:string;
fragment?:string;
reference?:string;
error?:string;
} |
269 | function normalize(uri: URIComponents, options?: URIOptions): URIComponents; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
270 | function normalize(uri: URIComponents, options?: URIOptions): URIComponents; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
271 | function normalize(uri: URIComponents, options?: URIOptions): URIComponents; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
272 | function normalize(uri: URIComponents, options?: URIOptions): URIComponents; | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
273 | function normalize(uri: URIComponents, options?: URIOptions): URIComponents; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
274 | function normalize(uri: URIComponents, options?: URIOptions): URIComponents; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
275 | function normalize(uri: URIComponents, options?: URIOptions): URIComponents; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
276 | function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; | interface URIComponents {
scheme?:string;
userinfo?:string;
host?:string;
port?:number|string;
path?:string;
query?:string;
fragment?:string;
reference?:string;
error?:string;
} |
277 | function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
278 | function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
279 | function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; | interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
} |
280 | function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; | interface URIOptions {
scheme?:string;
reference?:string;
tolerant?:boolean;
absolutePath?:boolean;
iri?:boolean;
unicodeSupport?:boolean;
domainHost?:boolean;
} |
281 | function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
282 | function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
283 | function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; | interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
} |
284 | <T>(type: ObjectTypeName) => (value: unknown): value is T => getObjectType(value) === type | type ObjectTypeName = typeof objectTypeNames[number]; |
285 | (method: ArrayMethod, predicate: Predicate, values: unknown[]) => {
if (!is.function_(predicate)) {
throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
}
if (values.length === 0) {
throw new TypeError('Invalid number of values');
}
return method.call(values, predicate);
} | type Predicate = (value: unknown) => boolean; |
286 | (method: ArrayMethod, predicate: Predicate, values: unknown[]) => {
if (!is.function_(predicate)) {
throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
}
if (values.length === 0) {
throw new TypeError('Invalid number of values');
}
return method.call(values, predicate);
} | type ArrayMethod = (fn: (value: unknown, index: number, array: unknown[]) => boolean, thisArg?: unknown) => boolean; |
287 | (predicate: Predicate, ...values: unknown[]): boolean => predicateOnArray(Array.prototype.every, predicate, values) | type Predicate = (value: unknown) => boolean; |
288 | (predicate: Predicate, ...values: unknown[]) => void | never | type Predicate = (value: unknown) => boolean; |
289 | (predicate: Predicate, ...values: unknown[]): void | never => assertType(is.all(predicate, ...values), AssertionTypeDescription.all, values, {multipleValues: true}) | type Predicate = (value: unknown) => boolean; |
290 | (request: ClientRequestWithTimings): Timings => {
if (request.timings) {
return request.timings;
}
const timings: Timings = {
start: Date.now(),
socket: undefined,
lookup: undefined,
connect: undefined,
secureConnect: undefined,
upload: undefined,
response: undefined,
end: undefined,
error: unde... | interface ClientRequestWithTimings extends ClientRequest {
timings?: Timings;
} |
291 | (response: IncomingMessageWithTimings): void => {
timings.response = Date.now();
timings.phases.firstByte = timings.response - timings.upload!;
response.timings = timings;
handleError(response);
response.prependOnceListener('end', () => {
request.off('abort', onAbort);
response.off('aborted', onAbort... | interface IncomingMessageWithTimings extends IncomingMessage {
timings?: Timings;
} |
292 | function outputNamespace(namespace: INamespace) {
let output = '';
const body = namespace.body();
for (const entry of body) {
if (output) {
output += EOL;
}
if (isInterface(entry)) {
output += outputInterface(entry, namespace.name) + EOL;
} else {
output += outputDeclaration(e... | interface INamespace {
name: string;
comment?: string;
body: () => (Interface | IDeclaration)[];
} |
293 | function outputInterface(entry: Interface, namespace = '') {
let output = '';
const extendList = isInterfaceProperties(entry)
? combineFlowExactTypes(entry.extends.map(extend => extend.name + stringifyGenerics(extend.generics)))
: '';
if (entry.export) {
output += 'export ';
}
output += 'type '... | type Interface = IInterfaceProperties | IInterfaceFallback; |
294 | function outputDeclaration(entry: IDeclaration, namespace = '') {
let output = '';
if (entry.export) {
output += 'export ';
}
output += `type ${
typeAliasName(namespace, entry.name) + stringifyGenerics(entry.generics, entry.export, stringifyTypes)
} = ${stringifyTypes(entry.types)}`;
return outpu... | interface IDeclaration {
name: string;
export: boolean;
types: DeclarableType[];
generics: IGenerics[];
namespace: INamespace | undefined;
} |
295 | function isInterfaceProperties(value: Interface): value is IInterfaceProperties {
return !!(value as IInterfaceProperties).properties;
} | type Interface = IInterfaceProperties | IInterfaceFallback; |
296 | (type: MixedType) => {
switch (type.type) {
case Type.Length:
hasLength = true;
break;
case Type.Time:
hasTime = true;
break;
case Type.DataType:
if (type.name in dataTypes) {
dataTypes[type.name].forEach(hasGeneric);
... | type MixedType = TypeType<IDataType<Type.DataType> | IAlias> | IArray; |
297 | function aliasOf({ name, generics, namespace }: IDeclaration): IAlias {
return alias(name, generics, namespace);
} | interface IDeclaration {
name: string;
export: boolean;
types: DeclarableType[];
generics: IGenerics[];
namespace: INamespace | undefined;
} |
298 | function isAliasProperty(value: PropertyType): value is IPropertyAlias {
return 'alias' in value;
} | type PropertyType = IPropertyAlias | IPropertyType; |
299 | function sorter(a: MixedType, b: MixedType) {
if (a.type === Type.StringLiteral && b.type === Type.StringLiteral) {
return a.literal < b.literal ? -1 : a.literal > b.literal ? 1 : 0;
}
if (a.type === Type.NumericLiteral && b.type === Type.NumericLiteral) {
return a.literal - b.literal;
}
return a.type... | type MixedType = TypeType<IDataType<Type.DataType> | IAlias> | IArray; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.