diff --git a/types/got/got-tests.ts b/types/got/got-tests.ts index 1eb2d89aa8..610ac87c26 100644 --- a/types/got/got-tests.ts +++ b/types/got/got-tests.ts @@ -258,3 +258,5 @@ got('todomvc', { got(new url.URL('http://todomvc.com')); got(url.parse('http://todomvc.com')); + +got('https://todomvc.com', { rejectUnauthorized: false }); diff --git a/types/got/index.d.ts b/types/got/index.d.ts index 86a3d42131..775985e581 100644 --- a/types/got/index.d.ts +++ b/types/got/index.d.ts @@ -75,7 +75,7 @@ declare const got: got.GotFn & CancelError: typeof CancelError; }; -interface InternalRequestOptions extends http.RequestOptions { +interface InternalRequestOptions extends https.RequestOptions { // Redeclare options with `any` type for allow specify types incompatible with http.RequestOptions. timeout?: any; agent?: any; @@ -93,7 +93,7 @@ declare namespace got { type GotStreamFn = (url: GotUrl, options?: GotOptions) => GotEmitter & nodeStream.Duplex; - type GotUrl = string | http.RequestOptions | Url | URL; + type GotUrl = string | https.RequestOptions | Url | URL; interface GotBodyOptions extends GotOptions { body?: string | Buffer | nodeStream.Readable;