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 1818 "license" : " MIT" ,
1919 "homepage" : " https://codeboltai.github.io" ,
2020 "dependencies" : {
21+ "@codebolt/common" : " ^1.0.3" ,
2122 "typedoc-plugin-missing-exports" : " ^2.2.0" ,
2223 "ws" : " ^8.17.0"
2324 },
2425 "devDependencies" : {
26+ "@types/events" : " ^3.0.3" ,
2527 "@types/ws" : " ^8.5.10" ,
2628 "jest" : " ^29.7.0" ,
2729 "jest-serial-runner" : " ^1.2.1" ,
Original file line number Diff line number Diff line change 11// chat.ts
22import cbws from './websocket' ;
33import { EventEmitter } from 'events' ;
4+ import { ChatMessage } from '@codebolt/common'
45
56/**
67 * CustomEventEmitter class that extends the Node.js EventEmitter class.
@@ -13,7 +14,7 @@ export class CustomEventEmitter extends EventEmitter {}
1314const cbchat = {
1415 eventEmitter : new CustomEventEmitter ( ) ,
1516
16- getChatHistory ( ) {
17+ getChatHistory ( ) : Promise < ChatMessage [ ] > {
1718 return new Promise ( ( resolve , reject ) => {
1819 cbws . getWebsocket . send ( JSON . stringify ( {
1920 "type" : "getChatHistory"
You can’t perform that action at this time.
0 commit comments