MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / constructor

Method constructor

src/pkg/config/config.ts:95–102  ·  view source on GitHub ↗
(private mq: IMessageQueue)

Source from the content-addressed store, hash-verified

93 private EE: EventEmitter<string> = new EventEmitter<string>();
94
95 constructor(private mq: IMessageQueue) {
96 this.mq.subscribe<TKeyValue<SystemConfigKey>>(SystemConfigChange, ({ key, value, prev }) => {
97 // 更新缓存
98 this.cache.set(key, value);
99 // 触发事件
100 this.EE.emit(key, value, prev);
101 });
102 }
103
104 // 添加配置变更监听
105 addListener<T extends SystemConfigKey>(

Callers

nothing calls this directly

Calls 3

subscribeMethod · 0.65
setMethod · 0.65
emitMethod · 0.65

Tested by

no test coverage detected