fix: types
This commit is contained in:
parent
bcd0ff26fa
commit
27c892288c
|
@ -2,7 +2,9 @@ import {createSocketServer} from './lifecycle';
|
|||
import LatusPacket from './packet';
|
||||
|
||||
const badPacketsCheck = (Packets, type) => {
|
||||
const badPackets = Packets.filter((Packet) => !(Packet instanceof LatusPacket));
|
||||
const badPackets = Object.fromEntries(
|
||||
Object.entries(Packets).filter(([, Packet]) => !(Packet instanceof LatusPacket)),
|
||||
);
|
||||
if (badPackets.length > 0) {
|
||||
const badKeys = Object.keys(badPackets);
|
||||
throw new Error([
|
||||
|
|
Loading…
Reference in New Issue
Block a user