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

Method sendMessage

packages/message/mock_message.ts:22–29  ·  view source on GitHub ↗
(data: TMessage)

Source from the content-addressed store, hash-verified

20 }
21
22 sendMessage(data: TMessage): void {
23 if (!this.EE) {
24 console.warn("Attempted to sendMessage on a disconnected MockConnection.");
25 // 無法 sendMessage 不应该屏蔽错误
26 throw new Error("Attempted to sendMessage on a disconnected MockConnection.");
27 }
28 this.EE.emit("message", data);
29 }
30
31 disconnect(ignoreAlreadyDisconnected?: boolean): void {
32 if (!this.EE) {

Callers

nothing calls this directly

Calls 2

warnMethod · 0.80
emitMethod · 0.65

Tested by

no test coverage detected