Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import * as Protocol from '../../protocol/protocol.chat';
- const smth = Protocol.parse(packet);
- if (smth instanceof Error) {
- // Oops. Something wrong with this packet.
- }
- if (Protocol.ChatMessage.instanceOf(smth) === true) {
- // This is chat message
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement