@kephas/core
Version:
Provides a common infrastructure for all the other Kephas Framework components: ambient services, dynamic reflection, composition, application management, and others.
23 lines (22 loc) • 708 B
TypeScript
import { Context } from "./context";
/**
* Helper class for working with services.
*
* @export
* @class ServiceHelper
*/
export declare class ServiceHelper {
/**
* Initializes the service asynchronously, provided it implements either the
* Initializable or AsyncInitializable interfaces.
*
* @static
* @param {{ [key: string]: any }} service
* @param {Context} [context] The context to pass to the initialization method.
* @returns {Promise<void>} A promise returning the asynchronous result.
* @memberof ServiceHelper
*/
static initializeAsync(service: {
[key: string]: any;
}, context?: Context): Promise<void>;
}