File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 18
18
"license" : " MIT" ,
19
19
"homepage" : " https://codeboltai.github.io" ,
20
20
"dependencies" : {
21
+ "@codebolt/common" : " ^1.0.3" ,
21
22
"typedoc-plugin-missing-exports" : " ^2.2.0" ,
22
23
"ws" : " ^8.17.0"
23
24
},
24
25
"devDependencies" : {
26
+ "@types/events" : " ^3.0.3" ,
25
27
"@types/ws" : " ^8.5.10" ,
26
28
"jest" : " ^29.7.0" ,
27
29
"jest-serial-runner" : " ^1.2.1" ,
Original file line number Diff line number Diff line change 1
1
// chat.ts
2
2
import cbws from './websocket' ;
3
3
import { EventEmitter } from 'events' ;
4
+ import { ChatMessage } from '@codebolt/common'
4
5
5
6
/**
6
7
* CustomEventEmitter class that extends the Node.js EventEmitter class.
@@ -13,7 +14,7 @@ export class CustomEventEmitter extends EventEmitter {}
13
14
const cbchat = {
14
15
eventEmitter : new CustomEventEmitter ( ) ,
15
16
16
- getChatHistory ( ) {
17
+ getChatHistory ( ) : Promise < ChatMessage [ ] > {
17
18
return new Promise ( ( resolve , reject ) => {
18
19
cbws . getWebsocket . send ( JSON . stringify ( {
19
20
"type" : "getChatHistory"
You can’t perform that action at this time.
0 commit comments