Socket
Socket
Sign inDemoInstall

@types/superagent

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/superagent - npm Package Compare versions

Comparing version 4.1.10 to 4.1.11

36

superagent/index.d.ts

@@ -13,2 +13,3 @@ // Type definitions for SuperAgent 4.1

// Anders Kindberg <https://github.com/ghostganz>
// LuckyWind_sck <https://github.com/LuckyWindsck>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -20,6 +21,6 @@ // TypeScript Version: 3.0

import * as fs from 'fs';
import * as http from 'http';
import * as stream from 'stream';
import * as cookiejar from 'cookiejar';
import * as fs from "fs";
import * as http from "http";
import * as stream from "stream";
import * as cookiejar from "cookiejar";

@@ -114,3 +115,3 @@ type CallbackHandler = (err: any, res: request.Response) => void;

get(header: string): string;
get(header: 'Set-Cookie'): string[];
get(header: "Set-Cookie"): string[];
header: any;

@@ -127,2 +128,3 @@ headers: any;

status: number;
statusCode: number;
statusType: number;

@@ -139,5 +141,9 @@ text: string;

accept(type: string): this;
attach(field: string, file: MultipartValueSingle, options?: string | { filename?: string; contentType?: string }): this;
auth(user: string, pass: string, options?: { type: 'basic' | 'auto' }): this;
auth(token: string, options: { type: 'bearer' }): this;
attach(
field: string,
file: MultipartValueSingle,
options?: string | { filename?: string; contentType?: string },
): this;
auth(user: string, pass: string, options?: { type: "basic" | "auto" }): this;
auth(token: string, options: { type: "bearer" }): this;
buffer(val?: boolean): this;

@@ -155,9 +161,9 @@ ca(cert: string | string[] | Buffer | Buffer[]): this;

ok(callback: (res: Response) => boolean): this;
on(name: 'error', handler: (err: any) => void): this;
on(name: 'progress', handler: (event: ProgressEvent) => void): this;
on(name: 'response', handler: (response: Response) => void): this;
on(name: "error", handler: (err: any) => void): this;
on(name: "progress", handler: (event: ProgressEvent) => void): this;
on(name: "response", handler: (response: Response) => void): this;
on(name: string, handler: (event: any) => void): this;
parse(parser: Parser): this;
part(): this;
pfx(cert: string | string[] | Buffer | Buffer[] | { pfx: string | Buffer, passphrase: string }): this;
pfx(cert: string | string[] | Buffer | Buffer[] | { pfx: string | Buffer; passphrase: string }): this;
pipe(stream: NodeJS.WritableStream, options?: object): stream.Writable;

@@ -172,4 +178,4 @@ query(val: object | string): this;

set(field: string, val: string): this;
set(field: 'Cookie', val: string[]): this;
timeout(ms: number | { deadline?: number, response?: number }): this;
set(field: "Cookie", val: string[]): this;
timeout(ms: number | { deadline?: number; response?: number }): this;
trustLocalhost(enabled?: boolean): this;

@@ -187,3 +193,3 @@ type(val: string): this;

interface ProgressEvent {
direction: 'download' | 'upload';
direction: "download" | "upload";
loaded: number;

@@ -190,0 +196,0 @@ percent?: number;

{
"name": "@types/superagent",
"version": "4.1.10",
"version": "4.1.11",
"description": "TypeScript definitions for SuperAgent",

@@ -56,2 +56,7 @@ "license": "MIT",

"githubUsername": "ghostganz"
},
{
"name": "LuckyWind_sck",
"url": "https://github.com/LuckyWindsck",
"githubUsername": "LuckyWindsck"
}

@@ -71,4 +76,4 @@ ],

},
"typesPublisherContentHash": "60891b7022cbef3a32d32141a386b0d4028747a5bc94e892adec4ddf594a0710",
"typeScriptVersion": "3.1"
"typesPublisherContentHash": "6fc9175f4ce2fa45cb5a8d782ccd620b2f1523a9d92421d838dfaddcdad261a0",
"typeScriptVersion": "3.5"
}

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

### Additional Details
* Last updated: Tue, 25 Aug 2020 11:24:37 GMT
* Last updated: Tue, 04 May 2021 15:31:21 GMT
* Dependencies: [@types/cookiejar](https://npmjs.com/package/@types/cookiejar), [@types/node](https://npmjs.com/package/@types/node)

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by [Nico Zelaya](https://github.com/NicoZelaya), [Michael Ledin](https://github.com/mxl), [Pap Lőrinc](https://github.com/paplorinc), [Shrey Jain](https://github.com/shreyjain1994), [Alec Zopf](https://github.com/zopf), [Adam Haglund](https://github.com/beeequeue), [Lukas Elmer](https://github.com/lukaselmer), [Jesse Rogers](https://github.com/theQuazz), [Chris Arnesen](https://github.com/carnesen), and [Anders Kindberg](https://github.com/ghostganz).
These definitions were written by [Nico Zelaya](https://github.com/NicoZelaya), [Michael Ledin](https://github.com/mxl), [Pap Lőrinc](https://github.com/paplorinc), [Shrey Jain](https://github.com/shreyjain1994), [Alec Zopf](https://github.com/zopf), [Adam Haglund](https://github.com/beeequeue), [Lukas Elmer](https://github.com/lukaselmer), [Jesse Rogers](https://github.com/theQuazz), [Chris Arnesen](https://github.com/carnesen), [Anders Kindberg](https://github.com/ghostganz), and [LuckyWind_sck](https://github.com/LuckyWindsck).
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