UNPKG

@triviality/core

Version:
13 lines (12 loc) 432 B
/** * Context helper for using async services. */ import { SF } from '../ServiceFactory'; import { InternalContextContext } from './InternalContextContext'; export interface AsyncContext { /** * Convert async service factory to sync service factory. */ synchronize<T>(sf: () => Promise<T>): SF<T>; } export declare const createFeatureFactoryAsyncContext: ({ container }: InternalContextContext) => AsyncContext;