diff --git a/types/fetch.io/fetch.io-tests.ts b/types/fetch.io/fetch.io-tests.ts index 538da8e74b..67c2612fdc 100644 --- a/types/fetch.io/fetch.io-tests.ts +++ b/types/fetch.io/fetch.io-tests.ts @@ -57,3 +57,8 @@ request .post('') .send({}) .json(); + +request + .post('') + .append('key', 'value') + .append({key: 'value'}); diff --git a/types/fetch.io/index.d.ts b/types/fetch.io/index.d.ts index 8258cbf8da..fabbbc4b52 100644 --- a/types/fetch.io/index.d.ts +++ b/types/fetch.io/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for fetch.io 3.1 +// Type definitions for fetch.io 4.0 // Project: https://github.com/haoxins/fetch.io // Definitions by: newraina // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -95,7 +95,9 @@ export class Request { /** * ppend formData */ - append(key: string, value: string): this; + append(key: string, value: any): this; + + append(object: {[key: string]: any}): this; /** * Get Response directly