UNPKG

typescript-closure-tools

Version:

Command-line tools to convert closure-style JSDoc annotations to typescript, and to convert typescript sources to closure externs files

14 lines (11 loc) 406 B
/// <reference path="superagent.d.ts" /> import superagent = require('superagent') var agent = superagent.agent(); agent .post('http://localhost:3000/signin') .send({ email: 'test@dummy.com', password: 'bacon' }) .end((err, res) => { if (err) throw err; if (res.status !== 200) throw new Error('bad status ' + res.status); if (res.body.foo === 'bar') throw new Error('bad body'); });