Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 5x 5x 5x 5x 5x 77x 77x 77x | import {PresenceService} from './PresenceService';
import {PubsubService} from './PubSubService';
import {BlocksServices, type BlocksServicesOpts} from './blocks/BlocksServices';
import {MemoryStore} from './blocks/store/MemoryStore';
import type {Store} from './blocks/store/types';
export interface ServicesOpts {
store?: Store;
blocks?: BlocksServicesOpts;
}
export class Services {
public readonly pubsub: PubsubService;
public readonly presence: PresenceService;
public readonly blocks: BlocksServices;
constructor({store = new MemoryStore(), blocks}: ServicesOpts = {}) {
this.pubsub = new PubsubService();
this.presence = new PresenceService();
this.blocks = new BlocksServices(this, store, blocks);
}
async stop() {
await this.blocks.stop();
}
}
|