New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/whatwg-fetch

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/whatwg-fetch - npm Package Compare versions

Comparing version 0.0.32 to 0.0.33

64

whatwg-fetch/index.d.ts

@@ -9,5 +9,5 @@ // Type definitions for Fetch API

interface Window {
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
}
declare var fetch: typeof window.fetch;
declare let fetch: typeof window.fetch;

@@ -20,3 +20,3 @@ declare type HeadersInit = Headers | string[][] | { [key: string]: string };

delete(name: string): void;
get(name: string): string; // | null; (TS 2.0 strict null check)
get(name: string): string | null;
has(name: string): boolean;

@@ -34,4 +34,5 @@ set(name: string, value: string): void;

declare type BodyInit = Blob | ArrayBufferView | ArrayBuffer | FormData /* | URLSearchParams */ | string;
declare type ResponseBodyInit = BodyInit | ReadableStream;
interface Body {
bodyUsed: boolean;
readonly bodyUsed: boolean;
arrayBuffer(): Promise<ArrayBuffer>;

@@ -41,2 +42,3 @@ blob(): Promise<Blob>;

json(): Promise<any>;
json<T>(): Promise<T>;
text(): Promise<string>;

@@ -47,18 +49,19 @@ }

declare class Request {
constructor(input: RequestInfo, init?: RequestInit);
method: string;
url: string;
headers: Headers;
constructor(input: RequestInfo, init?: RequestInit);
type: RequestType
destination: RequestDestination;
referrer: string;
referrerPolicy: ReferrerPolicy;
mode: RequestMode;
credentials: RequestCredentials;
cache: RequestCache;
redirect: RequestRedirect;
integrity: string;
readonly method: string;
readonly url: string;
readonly headers: Headers;
readonly type: RequestType
readonly destination: RequestDestination;
readonly referrer: string;
readonly referrerPolicy: ReferrerPolicy;
readonly mode: RequestMode;
readonly credentials: RequestCredentials;
readonly cache: RequestCache;
readonly redirect: RequestRedirect;
readonly integrity: string;
readonly keepalive: boolean;
clone(): Request;

@@ -78,3 +81,3 @@ }

integrity?: string;
window?: any;
window?: null; // can only be set to null
}

@@ -88,6 +91,7 @@

type RequestRedirect = "follow" | "error" | "manual";
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "same-origin" | "origin" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
declare class Response {
constructor(body?: BodyInit, init?: ResponseInit);
constructor(body?: ResponseBodyInit, init?: ResponseInit);

@@ -97,15 +101,17 @@ static error(): Response;

type: ResponseType;
url: string;
redirected: boolean;
status: number;
ok: boolean;
statusText: string;
headers: Headers;
body: ReadableStream; // | null;
trailer: Promise<Headers>;
readonly type: ResponseType;
readonly url: string;
readonly redirected: boolean;
readonly status: number;
readonly ok: boolean;
readonly statusText: string;
readonly headers: Headers;
readonly body: ReadableStream | null;
readonly trailer: Promise<Headers>;
clone(): Response;
}
interface Response extends Body {}
interface ResponseInit {

@@ -112,0 +118,0 @@ status?: number;

{
"name": "@types/whatwg-fetch",
"version": "0.0.32",
"version": "0.0.33",
"description": "TypeScript definitions for Fetch API",

@@ -17,4 +17,3 @@ "license": "MIT",

"peerDependencies": {},
"typings": "index.d.ts",
"typesPublisherContentHash": "932623a452d10d858207fa884bc1598af3ba5d80bd51f3f1869fffe5c13658e7"
"typesPublisherContentHash": "cd13beb415b0a58a5a248b4c71dea40eebc5095467d73d12b190feebd70df90a"
}

@@ -8,7 +8,6 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/whatwg-fetch
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/whatwg-fetch
Additional Details
* Last updated: Wed, 05 Oct 2016 20:53:42 GMT
* File structure: Global
* Last updated: Thu, 15 Dec 2016 16:51:52 GMT
* Library Dependencies: whatwg-streams

@@ -15,0 +14,0 @@ * Module Dependencies: none

{
"authors": "Ryan Graham <https://github.com/ryan-codingintrigue>, Kagami Sascha Rosylight <https://github.com/saschanaz>",
"definitionFilename": "index.d.ts",
"libraryDependencies": [

@@ -8,4 +7,4 @@ "whatwg-streams"

"moduleDependencies": [],
"libraryMajorVersion": "0",
"libraryMinorVersion": "0",
"libraryMajorVersion": 0,
"libraryMinorVersion": 0,
"libraryName": "Fetch API",

@@ -15,4 +14,3 @@ "typingsPackageName": "whatwg-fetch",

"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
"sourceBranch": "types-2.0",
"kind": "Global",
"sourceBranch": "master",
"globals": [

@@ -29,3 +27,3 @@ "Headers",

"hasPackageJson": false,
"contentHash": "932623a452d10d858207fa884bc1598af3ba5d80bd51f3f1869fffe5c13658e7"
"contentHash": "cd13beb415b0a58a5a248b4c71dea40eebc5095467d73d12b190feebd70df90a"
}
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