diff --git a/types/got/got-tests.ts b/types/got/got-tests.ts index 29370358be..a051bf46bd 100644 --- a/types/got/got-tests.ts +++ b/types/got/got-tests.ts @@ -19,6 +19,7 @@ got('todomvc.com') got('todomvc.com').cancel(); got('todomvc.com', {json: true}).then(response => obj = response.body); +got('todomvc.com', {json: true}).then(response => str = response.body); got('todomvc.com', {json: true, body: {}}).then(response => obj = response.body); got('todomvc.com', {json: true, body: [{}]}).then(response => obj = response.body); got('todomvc.com', {json: true, form: true}).then(response => obj = response.body); diff --git a/types/got/index.d.ts b/types/got/index.d.ts index c96c7eff25..5f45202937 100644 --- a/types/got/index.d.ts +++ b/types/got/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for got 7.1 // Project: https://github.com/sindresorhus/got#readme // Definitions by: BendingBender +// Linus Unnebäck // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -21,7 +22,7 @@ declare namespace got { // tslint:disable unified-signatures interface GotFn { (url: GotUrl): GotPromise; - (url: GotUrl, options: GotJSONOptions): GotPromise; + (url: GotUrl, options: GotJSONOptions): GotPromise; (url: GotUrl, options: GotFormOptions): GotPromise; (url: GotUrl, options: GotFormOptions): GotPromise; (url: GotUrl, options: GotBodyOptions): GotPromise;