From fea836e24610acdd3a4bbfc1b91061c0e4cd1c18 Mon Sep 17 00:00:00 2001 From: Marcos Passos Date: Thu, 30 Apr 2020 18:09:32 -0300 Subject: [PATCH] Export Plug interface --- src/index.ts | 4 +++- src/plug.ts | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 73043850a..f90139528 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,6 +19,7 @@ import { EventInfo, JsonValue, } from '@croct-tech/sdk'; +import {Plug, GlobalPlug} from './plug'; export { Sdk, @@ -40,6 +41,7 @@ export { EvaluationError, ExpressionError, JsonValue, + Plug, }; -export {default} from './plug'; +export default new GlobalPlug(); diff --git a/src/plug.ts b/src/plug.ts index 22eb794ce..ed3ce8c45 100644 --- a/src/plug.ts +++ b/src/plug.ts @@ -39,7 +39,7 @@ export interface Plug { unplug(): Promise; } -class GlobalPlug implements Plug { +export class GlobalPlug implements Plug { private instance?: SdkFacade; public plug(configuration: Configuration): void { @@ -126,5 +126,3 @@ class GlobalPlug implements Plug { } } } - -export default new GlobalPlug();