Skip to content

Commit

Permalink
Use simplified typings
Browse files Browse the repository at this point in the history
  • Loading branch information
apeace committed Aug 23, 2016
1 parent 7214b98 commit 01ce247
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/// <reference path="./typings/index.d.ts" />

import * as superagent from 'superagent';
import * as superagentPromise from 'superagent-promise';
import {SuperAgent} from 'superagent-promise';

const request = <SuperAgent>superagentPromise(superagent, Promise);
const request = superagentPromise(superagent, Promise);

let get = request.get('http://github.com');
let set = get.set('X-Awesome', 'superagent-promise');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"dependencies": {
"superagent": "^2.2.0",
"superagent-promise": "github:apeace/superagent-promise#typings"
"superagent-promise": "github:apeace/superagent-promise#typings2"
},
"devDependencies": {
"typescript": "^1.8.10",
Expand Down
3 changes: 2 additions & 1 deletion typings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "sa-promise-test",
"dependencies": {},
"globalDependencies": {
"node": "registry:dt/node#6.0.0+20160709114037"
"node": "registry:dt/node#6.0.0+20160709114037",
"superagent": "registry:dt/superagent#2.0.0+20160811085415"
}
}

0 comments on commit 01ce247

Please sign in to comment.