mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 13:14:48 +00:00
Remove __url namespace (#4668)
This commit is contained in:
parent
6660fb25c9
commit
f07fcfcc80
1 changed files with 126 additions and 128 deletions
34
cli/js/lib.deno.shared_globals.d.ts
vendored
34
cli/js/lib.deno.shared_globals.d.ts
vendored
|
@ -21,8 +21,6 @@ declare interface WindowOrWorkerGlobalScope {
|
||||||
CustomEvent: typeof __customEvent.CustomEvent;
|
CustomEvent: typeof __customEvent.CustomEvent;
|
||||||
Event: typeof __event.Event;
|
Event: typeof __event.Event;
|
||||||
EventTarget: typeof __eventTarget.EventTarget;
|
EventTarget: typeof __eventTarget.EventTarget;
|
||||||
URL: typeof __url.URL;
|
|
||||||
URLSearchParams: typeof __urlSearchParams.URLSearchParams;
|
|
||||||
Headers: __domTypes.HeadersConstructor;
|
Headers: __domTypes.HeadersConstructor;
|
||||||
FormData: __domTypes.FormDataConstructor;
|
FormData: __domTypes.FormDataConstructor;
|
||||||
ReadableStream: __domTypes.ReadableStreamConstructor;
|
ReadableStream: __domTypes.ReadableStreamConstructor;
|
||||||
|
@ -242,8 +240,6 @@ declare const EventInit: typeof __event.EventInit;
|
||||||
declare const Event: typeof __event.Event;
|
declare const Event: typeof __event.Event;
|
||||||
declare const EventListener: __domTypes.EventListener;
|
declare const EventListener: __domTypes.EventListener;
|
||||||
declare const EventTarget: typeof __eventTarget.EventTarget;
|
declare const EventTarget: typeof __eventTarget.EventTarget;
|
||||||
declare const URL: typeof __url.URL;
|
|
||||||
declare const URLSearchParams: typeof __urlSearchParams.URLSearchParams;
|
|
||||||
declare const Headers: __domTypes.HeadersConstructor;
|
declare const Headers: __domTypes.HeadersConstructor;
|
||||||
declare const location: __domTypes.Location;
|
declare const location: __domTypes.Location;
|
||||||
declare const FormData: __domTypes.FormDataConstructor;
|
declare const FormData: __domTypes.FormDataConstructor;
|
||||||
|
@ -272,8 +268,6 @@ declare type EventInit = __domTypes.EventInit;
|
||||||
declare type Event = __domTypes.Event;
|
declare type Event = __domTypes.Event;
|
||||||
declare type EventListener = __domTypes.EventListener;
|
declare type EventListener = __domTypes.EventListener;
|
||||||
declare type EventTarget = __domTypes.EventTarget;
|
declare type EventTarget = __domTypes.EventTarget;
|
||||||
declare type URL = __url.URL;
|
|
||||||
declare type URLSearchParams = __domTypes.URLSearchParams;
|
|
||||||
declare type Headers = __domTypes.Headers;
|
declare type Headers = __domTypes.Headers;
|
||||||
declare type FormData = __domTypes.FormData;
|
declare type FormData = __domTypes.FormData;
|
||||||
declare type ReadableStream<R = any> = __domTypes.ReadableStream<R>;
|
declare type ReadableStream<R = any> = __domTypes.ReadableStream<R>;
|
||||||
|
@ -1346,7 +1340,7 @@ declare namespace __fetch {
|
||||||
}
|
}
|
||||||
/** Fetch a resource from the network. */
|
/** Fetch a resource from the network. */
|
||||||
export function fetch(
|
export function fetch(
|
||||||
input: __domTypes.Request | __url.URL | string,
|
input: __domTypes.Request | URL | string,
|
||||||
init?: __domTypes.RequestInit
|
init?: __domTypes.RequestInit
|
||||||
): Promise<Response>;
|
): Promise<Response>;
|
||||||
}
|
}
|
||||||
|
@ -1384,9 +1378,7 @@ declare class TextEncoder {
|
||||||
readonly [Symbol.toStringTag]: string;
|
readonly [Symbol.toStringTag]: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare namespace __urlSearchParams {
|
interface URLSearchParams {
|
||||||
export class URLSearchParams {
|
|
||||||
constructor(init?: string | string[][] | Record<string, string>);
|
|
||||||
/** Appends a specified key/value pair as a new search parameter.
|
/** Appends a specified key/value pair as a new search parameter.
|
||||||
*
|
*
|
||||||
* searchParams.append('name', 'first');
|
* searchParams.append('name', 'first');
|
||||||
|
@ -1482,33 +1474,39 @@ declare namespace __urlSearchParams {
|
||||||
*/
|
*/
|
||||||
toString(): string;
|
toString(): string;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
declare namespace __url {
|
declare const URLSearchParams: {
|
||||||
export interface URL {
|
prototype: URLSearchParams;
|
||||||
|
new (
|
||||||
|
init?: string[][] | Record<string, string> | string | URLSearchParams
|
||||||
|
): URLSearchParams;
|
||||||
|
toString(): string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** The URL interface represents an object providing static methods used for creating object URLs. */
|
||||||
|
interface URL {
|
||||||
hash: string;
|
hash: string;
|
||||||
host: string;
|
host: string;
|
||||||
hostname: string;
|
hostname: string;
|
||||||
href: string;
|
href: string;
|
||||||
|
toString(): string;
|
||||||
readonly origin: string;
|
readonly origin: string;
|
||||||
password: string;
|
password: string;
|
||||||
pathname: string;
|
pathname: string;
|
||||||
port: string;
|
port: string;
|
||||||
protocol: string;
|
protocol: string;
|
||||||
search: string;
|
search: string;
|
||||||
readonly searchParams: __urlSearchParams.URLSearchParams;
|
readonly searchParams: URLSearchParams;
|
||||||
username: string;
|
username: string;
|
||||||
toString(): string;
|
|
||||||
toJSON(): string;
|
toJSON(): string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const URL: {
|
declare const URL: {
|
||||||
prototype: URL;
|
prototype: URL;
|
||||||
new (url: string, base?: string | URL): URL;
|
new (url: string, base?: string | URL): URL;
|
||||||
createObjectURL(object: __domTypes.Blob): string;
|
createObjectURL(object: any): string;
|
||||||
revokeObjectURL(url: string): void;
|
revokeObjectURL(url: string): void;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
declare class Worker {
|
declare class Worker {
|
||||||
onerror?: (e: Event) => void;
|
onerror?: (e: Event) => void;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue