From 374f73e072231fa0d9f52ae1bbb803967f9c59a6 Mon Sep 17 00:00:00 2001 From: Ihor Chulinda Date: Sun, 9 Jun 2019 19:02:23 +0200 Subject: [PATCH] fix(sync): remove redundant helper --- packages/sync/src/index.ts | 2 -- packages/sync/src/synchronous.ts | 1 - packages/sync/src/synchronousService.ts | 9 --------- 3 files changed, 12 deletions(-) delete mode 100644 packages/sync/src/synchronousService.ts diff --git a/packages/sync/src/index.ts b/packages/sync/src/index.ts index 6b11992b..72b5d6f8 100644 --- a/packages/sync/src/index.ts +++ b/packages/sync/src/index.ts @@ -1,5 +1,3 @@ export { context, runInSync } from './runInSync'; export { PromiseCache, sync } from './sync'; export { synchronous, Synchronous } from './synchronous'; -export { synchronousService } from './synchronousService'; - diff --git a/packages/sync/src/synchronous.ts b/packages/sync/src/synchronous.ts index e57cd862..41efa24a 100644 --- a/packages/sync/src/synchronous.ts +++ b/packages/sync/src/synchronous.ts @@ -51,4 +51,3 @@ export function synchronous(obj: I): Synchronous { return synchronousObj; } - diff --git a/packages/sync/src/synchronousService.ts b/packages/sync/src/synchronousService.ts deleted file mode 100644 index 46f8a497..00000000 --- a/packages/sync/src/synchronousService.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Callable, Constructable, isConstructor } from 'metaf-resolvable'; -import { synchronous } from './synchronous'; -export function synchronousService(serviceConstructor: Constructable<[], I> | Callable) { - const instance = isConstructor(serviceConstructor) - ? new serviceConstructor() - : serviceConstructor(); - - return synchronous(instance); -}