nope-js-node
Version:
NoPE Runtime for Nodejs. For Browser-Support please use nope-browser
41 lines (40 loc) • 1.84 kB
TypeScript
/**
* @author Martin Karkowski
* @email m.karkowski@zema.de
*/
import { IDispatcherConstructor, INopeDispatcherOptions, INopePackageLoader, INopePackageLoaderConstructor } from "../types/nope";
/**
* Function to extract the Package-Loader. This Package-Loader omits methods, that depends on a file-system.
*
* This method should be used in a browser enviroment, otherwise use the function created for the Backend.
*
* @param {INopeDispatcherOptions} dispatcherOptions The provided options for the Dispatcher
* @param options Settings for the creation of the Dispatcher etc.
* @returns {INopePackageLoader} The Package loader.
*/
export declare function getPackageLoader(dispatcherOptions: INopeDispatcherOptions, options?: {
/**
* If desired, the user is allowed ot change the Constructor of a Packageloader.
* This will ensure modularity.
*/
packageLoaderConstructorClass?: INopePackageLoaderConstructor;
/**
* If desired, the user is allowed ot change the Constructor of a Dipatcher.
* This will ensure modularity.
*/
dispatcherConstructorClass?: IDispatcherConstructor;
/**
* Flag to indicate, that there should be only 1 dispatcher per process. This
* is the default setting and it is recommended. (Its way faster due to the
* communication overhead, created using a dispatcher). In special use-cases
* (e.g. testing ) it might be usefull to have full controll of the amount of
* provided dispatchers.
*/
singleton?: boolean;
/**
* Flag to enable / Disable the usage of base-services for a dispatcher.
* Please checkout {@link dispatcher.useBaseServices} to get an overview
* of the defaultly implemented base-services.
*/
useBaseServices?: boolean;
}): INopePackageLoader;