chore: defaults
This commit is contained in:
parent
e2d9b196d9
commit
8676d69892
|
@ -14,12 +14,16 @@ export default class Packet {
|
|||
id: 'uint32',
|
||||
nsp: 'string',
|
||||
type: 'uint8',
|
||||
data: this.data || {},
|
||||
data: this.data,
|
||||
});
|
||||
}
|
||||
return this._builder;
|
||||
}
|
||||
|
||||
static get data() {
|
||||
return {};
|
||||
}
|
||||
|
||||
static pack(packet) {
|
||||
return this.builder.encode({
|
||||
id: packet.id || 0,
|
||||
|
|
Loading…
Reference in New Issue
Block a user