mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add restify definition
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/// <reference path="restify.d.ts" />
|
||||
|
||||
import restify = module("restify");
|
||||
|
||||
var server = restify.createServer({
|
||||
formatters: {
|
||||
'application/foo': function formatFoo(req, res, body) {
|
||||
if (body instanceof Error)
|
||||
return body.stack;
|
||||
|
||||
if (body)
|
||||
return body.toString('base64');
|
||||
|
||||
return body;
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user