refactor: small type improvements (#759)

This commit is contained in:
Carlos Valente
2024-02-03 23:17:36 +01:00
committed by GitHub
parent 1890fc49d7
commit 212e5f9e68
23 changed files with 143 additions and 91 deletions
@@ -4,7 +4,7 @@ import { throttle } from '../../utils/throttle.js';
import type { PublishFn } from '../../stores/EventStore.js';
let instance;
let instance: MessageService | null = null;
class MessageService {
timer: TimerMessage;
@@ -56,7 +56,7 @@ class MessageService {
init(publish: PublishFn) {
this.publish = publish;
this.throttledSet = throttle((key, value) => this.publish(key, value), 100);
this.throttledSet = throttle((key, value) => this.publish?.(key, value), 100);
}
getState(): MessageState {