mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
* 'request-promise' of https://github.com/joeskeen/DefinitelyTyped: # By Ilya Mochalov (83) and others # Via Masahiro Wakame (243) and others * 'master' of https://github.com/borisyankov/DefinitelyTyped: (473 commits) provide the explicit types in geolocation-tests to make the build happy in ng-cordova files correct the conventions for multiple authors add the ngCordova type definitions for network,deviceOrientation,deviceMotion, appAvailability,geolocation,emailComposer and dialogs lodash: signatures of the method _.forEach have been changed lodash: signatures of the method _.some have been changed lodash: signatures of the method _.compact have been changed lodash: signatures of the method _.startsWith have been changed lodash: signatures of the method _.callback have been changed Add delegate and undelegate methods to View Updated net.connect, combined url.Url and url.UrlOptions. fix angularjs/angular-resource.d.ts Added definition for inline-css rename the folder from ngCordova to follow the convention similar to bower & npm lodash: signatures of the method _.map changed added missing declaration for optional dynamicHash property on DurandalRelativeRouteSettings to support TypeScript 1.6 tightened compilation rules lodash: signatures of the method _.padLeft have been changed lodash: signatures of the method _.snakeCase have been changed lodash: signatures of the method _.propertyOf have been changed lodash: signatures of the method _.parseInt have been changed lodash: signatures of the method _.matchesProperty have been changed ... Conflicts: request-promise/request-promise.d.ts request/request.d.ts
31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
// Type definitions for request-promise v0.4.2
|
|
// Project: https://www.npmjs.com/package/request-promise
|
|
// Definitions by: Christopher Glantschnig <https://github.com/cglantschnig/>, Joe Skeen <http://github.com/joeskeen>
|
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
|
|
// Change [0]: 2015/08/20 - Aya Morisawa <https://github.com/AyaMorisawa>
|
|
|
|
/// <reference path="../request/request.d.ts" />
|
|
/// <reference path="../bluebird/bluebird.d.ts" />
|
|
|
|
declare module 'request-promise' {
|
|
import request = require('request');
|
|
import http = require('http');
|
|
|
|
interface RequestPromise extends request.Request {
|
|
then(onFulfilled: Function, onRejected?: Function): Promise<any>;
|
|
catch(onRejected: Function): Promise<any>;
|
|
finally(onFinished: Function): Promise<any>;
|
|
promise(): Promise<any>;
|
|
}
|
|
|
|
interface RequestPromiseOptions extends request.OptionalOptions {
|
|
simple?: boolean;
|
|
transform?: (body: any, response: http.IncomingMessage) => any;
|
|
resolveWithFullResponse?: boolean;
|
|
}
|
|
|
|
var requestPromise: request.RequestAPI<RequestPromise, RequestPromiseOptions>;
|
|
export = requestPromise;
|
|
}
|