mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
Merge branch 'master' of https://github.com/DefinitelyTyped/DefinitelyTyped
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
import * as request from 'superagent';
|
||||
import * as fs from 'fs';
|
||||
import * as assert from 'assert';
|
||||
|
||||
// Examples taken from https://github.com/visionmedia/superagent/blob/gh-pages/docs/index.md
|
||||
// and https://github.com/visionmedia/superagent/blob/master/Readme.md
|
||||
@@ -302,4 +303,14 @@ request
|
||||
request
|
||||
.get('/search')
|
||||
.then((response) => {})
|
||||
.catch((error) => {});
|
||||
.catch((error) => {});
|
||||
|
||||
// Requesting binary data.
|
||||
// adapted from: https://github.com/visionmedia/superagent/blob/v2.0.0/test/client/request.js#L110
|
||||
request
|
||||
.get('/blob')
|
||||
.responseType('blob')
|
||||
.end(function (err, res) {
|
||||
assert(res.xhr instanceof XMLHttpRequest)
|
||||
assert(res.xhr.response instanceof Blob);
|
||||
});
|
||||
|
||||
Vendored
+2
@@ -77,6 +77,7 @@ declare module "superagent" {
|
||||
notAcceptable: boolean;
|
||||
notFound: boolean;
|
||||
forbidden: boolean;
|
||||
xhr: XMLHttpRequest;
|
||||
get(header: string): string;
|
||||
}
|
||||
|
||||
@@ -96,6 +97,7 @@ declare module "superagent" {
|
||||
pipe(stream: NodeJS.WritableStream, options?: Object): stream.Writable;
|
||||
query(val: Object): this;
|
||||
redirects(n: number): this;
|
||||
responseType(type: string): this;
|
||||
send(data: string): this;
|
||||
send(data: Object): this;
|
||||
send(): this;
|
||||
|
||||
@@ -24,7 +24,7 @@ d.remove();
|
||||
d.toggle();
|
||||
d.position();
|
||||
d.destroy();
|
||||
d.element.appendChild(document.createElement("div"));
|
||||
d.content.appendChild(document.createElement("div"));
|
||||
d.tether.position();
|
||||
|
||||
d.on("open", () => false);
|
||||
|
||||
Vendored
-1
@@ -10,7 +10,6 @@ declare class Drop {
|
||||
constructor(options: Drop.IDropOptions);
|
||||
|
||||
public content: HTMLElement;
|
||||
public element: HTMLElement;
|
||||
public tether: Tether;
|
||||
public open(): void;
|
||||
public close(): void;
|
||||
|
||||
Reference in New Issue
Block a user