Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/fetch-mock

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/fetch-mock - npm Package Compare versions

Comparing version 7.3.5 to 7.3.6

116

fetch-mock/index.d.ts

@@ -111,7 +111,13 @@ // Type definitions for fetch-mock 7.3

*/
type MockResponse = Response | Promise<Response>
| number | Promise<number>
| string | Promise<string>
| {} | Promise<{}>
| MockResponseObject | Promise<MockResponseObject>;
type MockResponse =
| Response
| Promise<Response>
| number
| Promise<number>
| string
| Promise<string>
| {}
| Promise<{}>
| MockResponseObject
| Promise<MockResponseObject>;

@@ -219,19 +225,19 @@ /**

interface MockOptionsMethodGet extends MockOptions {
method?: 'GET' | undefined;
method?: "GET" | undefined;
}
interface MockOptionsMethodPost extends MockOptions {
method?: 'POST' | undefined;
method?: "POST" | undefined;
}
interface MockOptionsMethodPut extends MockOptions {
method?: 'PUT' | undefined;
method?: "PUT" | undefined;
}
interface MockOptionsMethodDelete extends MockOptions {
method?: 'DELETE' | undefined;
method?: "DELETE" | undefined;
}
interface MockOptionsMethodHead extends MockOptions {
method?: 'HEAD' | undefined;
method?: "HEAD" | undefined;
}

@@ -301,3 +307,7 @@

*/
getOnce(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodGet): this;
getOnce(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodGet,
): this;

@@ -313,3 +323,7 @@ /**

*/
post(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodPost): this;
post(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodPost,
): this;

@@ -326,3 +340,7 @@ /**

*/
postOnce(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodPost): this;
postOnce(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodPost,
): this;

@@ -350,3 +368,7 @@ /**

*/
putOnce(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodPut): this;
putOnce(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodPut,
): this;

@@ -362,3 +384,7 @@ /**

*/
delete(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodDelete): this;
delete(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodDelete,
): this;

@@ -375,3 +401,7 @@ /**

*/
deleteOnce(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodDelete): this;
deleteOnce(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodDelete,
): this;

@@ -387,3 +417,7 @@ /**

*/
head(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this;
head(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodHead,
): this;

@@ -400,3 +434,7 @@ /**

*/
headOnce(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this;
headOnce(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodHead,
): this;

@@ -412,3 +450,7 @@ /**

*/
patch(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this;
patch(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodHead,
): this;

@@ -425,3 +467,7 @@ /**

*/
patchOnce(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this;
patchOnce(
matcher: MockMatcher,
response: MockResponse | MockResponseFunction,
options?: MockOptionsMethodHead,
): this;

@@ -577,3 +623,3 @@ /**

*/
fallbackToNetwork?: boolean | 'always' | undefined;
fallbackToNetwork?: boolean | "always" | undefined;

@@ -601,6 +647,8 @@ /**

*/
Promise?: new (executor: (
resolve: (value: Response | PromiseLike<Response>) => void,
reject: (reason?: any) => void,
) => void) => Promise<Response> | undefined | undefined;
Promise?: new(
executor: (
resolve: (value: Response | PromiseLike<Response>) => void,
reject: (reason?: any) => void,
) => void,
) => Promise<Response> | undefined | undefined;

@@ -610,6 +658,8 @@ /**

*/
fetch?: ((
input?: string | Request,
init?: RequestInit,
) => Promise<Response>) | undefined;
fetch?:
| ((
input?: string | Request,
init?: RequestInit,
) => Promise<Response>)
| undefined;

@@ -620,3 +670,3 @@ /**

*/
Headers?: (new () => Headers | undefined) | undefined;
Headers?: (new() => Headers | undefined) | undefined;

@@ -627,3 +677,3 @@ /**

*/
Request?: (new (input: string | Request, init?: RequestInit) => Request | undefined) | undefined;
Request?: (new(input: string | Request, init?: RequestInit) => Request | undefined) | undefined;

@@ -634,3 +684,3 @@ /**

*/
Response?: (new () => Response | undefined) | undefined;
Response?: (new() => Response | undefined) | undefined;
};

@@ -644,3 +694,3 @@ }

*/
(input?: string | Request , init?: RequestInit): Promise<Response>;
(input?: string | Request, init?: RequestInit): Promise<Response>;
}

@@ -647,0 +697,0 @@ }

{
"name": "@types/fetch-mock",
"version": "7.3.5",
"version": "7.3.6",
"description": "TypeScript definitions for fetch-mock",

@@ -68,4 +68,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fetch-mock",

"dependencies": {},
"typesPublisherContentHash": "e037a43db4814ab9f1bb66d2b9b99561392ebb32ce09e9714b8153a4ca04a184",
"typeScriptVersion": "3.6"
"typesPublisherContentHash": "f106665cef6b74bab66dff41893d01f7a7deede32fec1ee4a8f6ca00743bde0a",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Thu, 08 Jul 2021 12:01:32 GMT
* Last updated: Thu, 14 Sep 2023 15:26:41 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc