Home > @xoram/core > addService
addService() function
Register a self-contained service with no dependency.
Signature:
typescript
export declare function addService<id extends ServiceId>(id: id, service: ServiceCollection[id]): void;
1
Parameters
Parameter | Type | Description |
---|---|---|
id | id | the id to register the service under, MUST be unique |
service | a ready to use service instance |
Returns:
void