diff options
author | Axetroy <axetroy.dev@gmail.com> | 2019-12-14 20:49:30 +0800 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-12-14 20:49:30 +0800 |
commit | 83f95fb8dfaed42eee3e1e0cd3a6e9b94f05ef2d (patch) | |
tree | d7d8db6caa3f47bb598c83cb4e489d1272840d35 /cli/js/lib.deno_runtime.d.ts | |
parent | 7e116dd70d7c194f2967d64e7700aae0bb17100f (diff) |
fetch support URL instance as input (#3496)
Diffstat (limited to 'cli/js/lib.deno_runtime.d.ts')
-rw-r--r-- | cli/js/lib.deno_runtime.d.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index 0d3463869..98e93fc36 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -2481,7 +2481,7 @@ declare namespace __fetch { } /** Fetch a resource from the network. */ export function fetch( - input: __domTypes.Request | string, + input: __domTypes.Request | __url.URL | string, init?: __domTypes.RequestInit ): Promise<Response>; } @@ -2658,11 +2658,7 @@ declare namespace __urlSearchParams { declare namespace __url { // @url js/url.d.ts - - export class URL { - private _parts; - private _searchParams; - private _updateSearchParams; + export interface URL { hash: string; host: string; hostname: string; @@ -2673,14 +2669,18 @@ declare namespace __url { port: string; protocol: string; search: string; - username: string; readonly searchParams: __urlSearchParams.URLSearchParams; - constructor(url: string, base?: string | URL); + username: string; toString(): string; toJSON(): string; - static createObjectURL(b: __domTypes.Blob): string; - static revokeObjectURL(url: string): void; } + + export const URL: { + prototype: URL; + new (url: string, base?: string | URL): URL; + createObjectURL(object: __domTypes.Blob): string; + revokeObjectURL(url: string): void; + }; } declare namespace __workers { |