Files
DefinitelyTyped/types/supertest-as-promised/index.d.ts
Andy 954ee278de Update TypeScript Versions to be at least as high as dependencies' versions (#21288)
* Update `TypeScript Version`s to be at least as high as dependencies' versions

* Run through again
2017-11-08 09:12:14 -08:00

32 lines
1017 B
TypeScript

// Type definitions for SuperTest as Promised 2.0
// Project: https://github.com/WhoopInc/supertest-as-promised
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as supertest from "supertest";
import * as superagent from "superagent";
import { SuperTest, Response } from "supertest";
import * as PromiseBluebird from "bluebird";
declare function supertestAsPromised(app: any): SuperTest<supertestAsPromised.Test>;
declare namespace supertestAsPromised {
interface Request extends supertest.Request {
}
interface Response extends supertest.Response {
}
interface Test extends supertest.Test, superagent.Request {
toPromise(): PromiseBluebird<Response>;
timeout(): Promise<Response> & this;
}
function agent(app?: any): SuperTest<Test>;
interface SuperTest<T extends Request> extends supertest.SuperTest<T> {
}
}
export = supertestAsPromised;