mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
needle definitions added
This commit is contained in:
@@ -249,6 +249,7 @@ All definitions files include a header with the author and editors, so at some p
|
||||
* [msgpack.js](https://github.com/uupaa/msgpack.js) (by [Shinya Mochizuki](https://github.com/enrapt-mochizuki))
|
||||
* [Mustache.js](https://github.com/janl/mustache.js) (by [Boris Yankov](https://github.com/borisyankov))
|
||||
* [nconf](https://github.com/flatiron/nconf) (by [Jeff Goddard](https://github.com/jedigo))
|
||||
* [needle](https://github.com/tomas/needle) (by [San Chen](https://github.com/bigsan))
|
||||
* [noble](https://github.com/sandeepmistry/noble) (by [Seon-Wook Park](https://github.com/swook))
|
||||
* [nock](https://github.com/pgte/nock) (by [bonnici](https://github.com/bonnici))
|
||||
* [Node.js](http://nodejs.org/) (from TypeScript samples)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/// <reference path="needle.d.ts" />
|
||||
|
||||
import needle = require("needle");
|
||||
|
||||
var url = "";
|
||||
var options = {};
|
||||
var callback = (err, resp) => {};
|
||||
|
||||
needle.head(url, options, callback);
|
||||
needle.get(url, options, callback);
|
||||
needle.post(url, data, options, callback);
|
||||
needle.put(url, data, options, callback);
|
||||
needle.delete(url, data, options, callback);
|
||||
needle.request(method, url, data, options, callback);
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// Type definitions for needle 0.7.8
|
||||
// Project: https://github.com/tomas/needle
|
||||
// Definitions by: San Chen <https://github.com/bigsan>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface INeedle {
|
||||
head(url: string): IReadableStream;
|
||||
head(url: string, callback?: Function): IReadableStream;
|
||||
head(url: string, options?: any, callback?: Function): IReadableStream;
|
||||
|
||||
}
|
||||
|
||||
declare module "needle" {
|
||||
var needle: INeedle;
|
||||
export = needle;
|
||||
}
|
||||
Reference in New Issue
Block a user