mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
Merge pull request #17891 from newraina/fix-fetch-io-type
add patch method definition for fetch.io package
This commit is contained in:
@@ -23,6 +23,10 @@ request
|
||||
.put('')
|
||||
.json();
|
||||
|
||||
request
|
||||
.patch('')
|
||||
.json();
|
||||
|
||||
request
|
||||
.config('key', 'value')
|
||||
.json();
|
||||
|
||||
9
types/fetch.io/index.d.ts
vendored
9
types/fetch.io/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for fetch.io 4.0
|
||||
// Type definitions for fetch.io 4.1
|
||||
// Project: https://github.com/haoxins/fetch.io
|
||||
// Definitions by: newraina <https://github.com/newraina>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -63,6 +63,11 @@ export class Request {
|
||||
*/
|
||||
put: (url: TUrl) => this;
|
||||
|
||||
/**
|
||||
* HTTP patch method
|
||||
*/
|
||||
patch: (url: TUrl) => this;
|
||||
|
||||
/**
|
||||
* Set Options
|
||||
*/
|
||||
@@ -93,7 +98,7 @@ export class Request {
|
||||
send(data: {[key: string]: any}): this;
|
||||
|
||||
/**
|
||||
* ppend formData
|
||||
* append formData
|
||||
*/
|
||||
append(key: string, value: any): this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user