mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-29 09:55:50 +08:00
* Added typings for "require-dir". * Fixed dtslint errors. * Fixed By field. * Added typings for "restify-cookies". * Added "cookies" field to Request interface.
9 lines
253 B
TypeScript
9 lines
253 B
TypeScript
import { Request, Response, Server } from 'restify';
|
|
import 'restify-cookies';
|
|
|
|
function test(server: Server) {
|
|
server.get('/api/test', (req: Request, res: Response) => {
|
|
res.setCookie('myCookie', 'test' + req.cookies.foo, { path: '/' });
|
|
});
|
|
}
|