Skip to content

Commit

Permalink
fix(all): fix export default
Browse files Browse the repository at this point in the history
fix export default
  • Loading branch information
louiswu committed Apr 30, 2019
1 parent 6365f0e commit 265adcb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion __tests__/invoke.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { default: sdk } = require('../dist/index')
const sdk = require('../dist/index')

sdk.init({
region: 'ap-guangzhou'
Expand Down
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ declare class SDK {
invoke: typeof services.invoke;
}
declare const _default: SDK;
export default _default;
export = _default;
3 changes: 1 addition & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const services = require("./services");
const Capi = require("qcloudapi-sdk");
const util = require("util");
Expand Down Expand Up @@ -27,4 +26,4 @@ class SDK {
this.requestHelper = util.promisify(capi.request.bind(capi));
}
}
exports.default = new SDK();
module.exports = new SDK();
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ class SDK {
invoke = services.invoke
}

export default new SDK()
export = new SDK()

0 comments on commit 265adcb

Please sign in to comment.