Add restify definition

This commit is contained in:
Bret Little
2013-02-12 22:08:16 -07:00
parent 8ebf0010ca
commit 204569719e
2 changed files with 57 additions and 0 deletions
+17
View File
@@ -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;
}
}
});