makes global request type an interface (#2503)

This commit is contained in:
Kurt Mackey 2019-06-11 20:32:49 -05:00 committed by Ryan Dahl
parent 878d092df9
commit 7bdeee8997
2 changed files with 7 additions and 2 deletions

View file

@ -444,6 +444,11 @@ export interface ResponseInit {
statusText?: string;
}
export interface RequestConstructor {
new (input: RequestInfo, init?: RequestInit): Request;
prototype: Request;
}
export interface Request extends Body {
/** Returns the cache mode associated with request, which is a string
* indicating how the the request will interact with the browser's cache when

View file

@ -117,8 +117,8 @@ export type TextEncoder = textEncoding.TextEncoder;
window.TextDecoder = textEncoding.TextDecoder;
export type TextDecoder = textEncoding.TextDecoder;
window.Request = request.Request;
export type Request = request.Request;
window.Request = request.Request as domTypes.RequestConstructor;
export type Request = domTypes.Request;
//window.Response = response.Response;
//export type Response = response.Response;