1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-04 00:54:14 +02:00

Give ConsoleCmd a Packet type

This commit is contained in:
George Pittarelli 2017-03-09 22:15:25 -08:00
commit f43bf30f96
3 changed files with 13 additions and 3 deletions

View file

@ -1,7 +1,11 @@
import {ConsoleCmdPacket} from "../../Data/Packet";
import {Parser} from './Parser';
export class ConsoleCmd extends Parser {
parse() {
return this.stream.readUTF8String();
parse(): ConsoleCmdPacket[] {
return [{
packetType: 'consoleCmd',
command: this.stream.readUTF8String()
}];
}
}

View file

@ -21,5 +21,5 @@ export abstract class Parser {
this.skippedPackets = skippedPacket;
}
abstract parse(): Packet[]|string;
abstract parse(): Packet[];
}