Skip to content

Commit

Permalink
Append index exports and fix types. (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoninbouchal committed Aug 14, 2019
1 parent e5b28c1 commit dd43f90
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 41 deletions.
70 changes: 35 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "async-json-request",
"version": "4.0.1",
"version": "4.1.0",
"description": "Base request methods based on promises for async/await ussage",
"main": "./dist/index.js",
"scripts": {
Expand All @@ -20,7 +20,9 @@
},
"homepage": "https://github.com/bouchal/node-async-json-request#readme",
"dependencies": {
"@types/caseless": "^0.12.1",
"@types/methods": "^1.1.0",
"@types/request": "^2.48.1",
"deepmerge": "^2.1.1",
"methods": "^1.1.2",
"request": "^2.88.0"
Expand All @@ -30,7 +32,6 @@
"@types/express": "^4.16.0",
"@types/mocha": "^5.2.5",
"@types/node": "^10.12.18",
"@types/request": "^2.48.1",
"body-parser": "^1.18.3",
"express": "^4.16.3",
"istanbul": "^1.0.0-alpha.2",
Expand Down
7 changes: 3 additions & 4 deletions src/JsonRequest.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import * as request from "request";
import * as deepmerge from "deepmerge";
import {CoreOptions} from "request";
import {Request} from "request";
import {ResponseAsJSON} from "request";
import {Request, ResponseAsJSON, CoreOptions} from "request";
import {IncomingMessage} from "http";
import {Caseless} from "caseless";


interface Response<T = any> extends IncomingMessage {
statusCode: number;
statusMessage: string;
request: Request;
body: T;
caseless: any;
caseless: Caseless;
toJSON(): ResponseAsJSON;

timingStart?: number;
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import JsonRequest from './JsonRequest';

export {
JsonRequest
}

export default JsonRequest;

0 comments on commit dd43f90

Please sign in to comment.