types.nope.INopePackageLoader - ZeMA-gGmbH/NoPE-JS GitHub Wiki

Interface: INopePackageLoader

types.nope.INopePackageLoader

Properties

activationHandlers

activationHandlers: INopeActivationHanlder[]

This is a helper used during the Building process of utilizing inversify. This might be deprecated.

Deprecated


container

container: Container

Internally the loader is build using inversify. InversifyJS is a powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.

For more details about InversifyJS please checkout: https://inversify.io/

This Element contains a default inversify container


dispatcher

dispatcher: INopeDispatcher

Accessor for a Dispatcher; This dispatcher is created using a default package, containing definition for the dispatcher etc. please see nope.loader.generateNopeBasicPackage to checkout the default function.

Memberof

INopePackageLoader

Methods

addActivationHandler

addActivationHandler(handler): Promise<void>

Function to add Activation Handlers.

Memberof

INopePackageLoader

Parameters

Name Type
handler INopeActivationHanlder | INopeActivationHanlder[]

Returns

Promise<void>

{Promise}


addContainers

addContainers(container): any

Function to Add a different inversify container to the system. This will lead to a merge. This might be deprecated.

Deprecated

Memberof

INopePackageLoader

Parameters

Name Type
container Container

Returns

any


addDecoratedElements

addDecoratedElements(options?): Promise<void>

Helper to add the decorated Elements.

Parameters

Name Type
options? Object
options.addClassCallback? (options: INopeModule) => Promise<boolean>
options.addServiceCallback? (options: IexportAsNopeServiceParameters) => Promise<boolean>
options.consider? ("services" | "classes")[]

Returns

Promise<void>


addDescription

addDescription(element): Promise<void>

Add a Description of a Package to the Loader. This results in hosting the contained services and providing constructors for the shared classes.

Additionally all defined instances of a pac

Memberof

INopePackageLoader

Parameters

Name Type
element IClassDescriptor<INopeModule>[]

Returns

Promise<void>

{Promise}


addPackage

addPackage(element): Promise<void>

Functionality to add a complete Package. This results in hosting the contained services and providing constructors for the shared classes.

Afterwards the provided instances can be created using generateInstances.

Memberof

INopePackageLoader

Parameters

Name Type
element IPackageDescription<any>

Returns

Promise<void>

{Promise}


generateInstances

generateInstances(testRequirements?): Promise<void>

Generate the Instances that has been added via the packages.

Memberof

INopePackageLoader

Parameters

Name Type Description
testRequirements? boolean Flag to turn on / off the Tests. Defaultly the test is activated. Circular dependencies are not handled.

Returns

Promise<void>


provideLinkedServices

provideLinkedServices(): Promise<void>

Generates all linked services.

Memberof

INopePackageLoader

Returns

Promise<void>


reset

reset(): Promise<void>

Resets the Package Loader

Memberof

INopePackageLoader

Returns

Promise<void>

{Promise}

⚠️ **GitHub.com Fallback** ⚠️