From 7a790a6fb6ceaabf54af6ebce7be0b44517996b3 Mon Sep 17 00:00:00 2001 From: embbnux Date: Tue, 13 Aug 2019 17:10:54 +0800 Subject: [PATCH] remove export default --- src/Session.ts | 2 +- src/formatParty.ts | 2 +- src/index.ts | 6 +++--- webpack.config.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Session.ts b/src/Session.ts index 3404749..12dd0ce 100644 --- a/src/Session.ts +++ b/src/Session.ts @@ -60,7 +60,7 @@ function diffParties(oldParties: Party[], updatedParties: Party[]) { return diffs; } -export default class Session extends EventEmitter { +export class Session extends EventEmitter { private _data: any; private _eventSequence: Number; private _sdk: any; diff --git a/src/formatParty.ts b/src/formatParty.ts index 5764402..630687f 100644 --- a/src/formatParty.ts +++ b/src/formatParty.ts @@ -1,4 +1,4 @@ -export default function formatParty({ owner, ...party }) { +export function formatParty({ owner, ...party }) { if (!owner) { if (!party.extensionId && party.accountId) { delete party.accountId; diff --git a/src/index.ts b/src/index.ts index 1f4839a..d5ff7e4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import { EventEmitter } from 'events'; import RingCentral from 'ringcentral'; -import Session from './Session'; -import formatParty from './formatParty'; +import { Session } from './Session'; +import { formatParty } from './formatParty'; export interface SessionsMap { [key: string]: any; @@ -66,7 +66,7 @@ export interface CallOutToParams { extensionNumber?: string; } -export default class RingCentralCallControl extends EventEmitter { +export class RingCentralCallControl extends EventEmitter { private _sdk: RingCentral; private _sessionsMap: SessionsMap; private _devices: Device[]; diff --git a/webpack.config.js b/webpack.config.js index ad067ea..fe717de 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,7 +7,7 @@ module.exports = { path: path.resolve(__dirname, 'build'), library: 'RingCentralCallControl', libraryTarget: 'umd', - libraryExport: 'default' + libraryExport: 'RingCentralCallControl' }, externals: { externals: {