Home > @xoram/core > ServiceCollection
ServiceCollection interface
Register your service in this interface by augmenting it
Signature:
typescript
export interface ServiceCollection
1
Example
ts
import {ServiceCollection} from '@xoram/core';
export type MyServiceNotifications = {
// your service events if any
}
export interface MyService extends Service<MyServiceNotifications> {
// your service's public members if any
}
declare module '@xoram/core' {
interface ServiceCollection
// a comment here will show up in the intellisence when accessing app.services.myService
myService: MyService;
myTopic: Service<MyServiceNotifications>;
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17