Home > @xoram/core > addService
addService() function
Register a service the depends on another or on the application.
Signature:
typescript
export declare function addService<id extends ServiceId>(id: id, serviceFactory: ServiceFactory<ServiceCollection[id]>): void;1
Parameters
Parameter | Type | Description |
|---|---|---|
id | id | the id to register the service under, MUST be unique |
serviceFactory | a function taking in the application instance and returning a ready to use service |
Returns:
void