11 lines
256 B
TypeScript
11 lines
256 B
TypeScript
export default abstract class OutputPacket {
|
|
send (ws: WebSocket): void {
|
|
ws.send(JSON.stringify({
|
|
command: this.command(),
|
|
data: this.data()
|
|
}))
|
|
}
|
|
abstract data (): any
|
|
abstract command (): string
|
|
}
|