mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-01 19:45:48 +08:00
Merge pull request #26164 from ryanrhee/patch-1
node-fetch: Add URLSearchParams as valid body
This commit is contained in:
3
types/node-fetch/index.d.ts
vendored
3
types/node-fetch/index.d.ts
vendored
@@ -7,6 +7,7 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Agent } from "http";
|
||||
import { URLSearchParams } from "url";
|
||||
|
||||
export class Request extends Body {
|
||||
constructor(input: string | { href: string } | Request, init?: RequestInit);
|
||||
@@ -164,7 +165,7 @@ export interface ResponseInit {
|
||||
}
|
||||
|
||||
export type HeaderInit = Headers | string[];
|
||||
export type BodyInit = ArrayBuffer | ArrayBufferView | NodeJS.ReadableStream | string;
|
||||
export type BodyInit = ArrayBuffer | ArrayBufferView | NodeJS.ReadableStream | string | URLSearchParams;
|
||||
export type RequestInfo = string | Request;
|
||||
|
||||
export default function fetch(
|
||||
|
||||
Reference in New Issue
Block a user