@hytopia.com/server-protocol 1.3.4 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hytopia.com/server-protocol",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,6 +1,6 @@
1
1
  import * as inboundPackets from './inbound';
2
2
  import * as outboundPackets from './outbound';
3
- import type { PacketId, AnyPacket, AnyPacketDefinition } from './PacketCore';
3
+ import type { PacketId, AnyPacket, AnyPacketDefinition, IPacket } from './PacketCore';
4
4
 
5
5
  export { inboundPackets, outboundPackets };
6
6
 
@@ -20,7 +20,7 @@ for (const packet of Object.values(allPackets)) {
20
20
  }
21
21
  }
22
22
 
23
- export function isValidPacket(packet: unknown): packet is AnyPacket {
23
+ export function isValidPacket(packet: IPacket<PacketId, unknown>): packet is AnyPacket {
24
24
  if (
25
25
  typeof packet !== 'object' ||
26
26
  packet === null ||
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["ESNext"],
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "moduleResolution": "node",
7
+ "strict": true,
8
+ "noImplicitReturns": true,
9
+ "noImplicitAny": true,
10
+ "noImplicitThis": true,
11
+ "strictNullChecks": true,
12
+ },
13
+ "include": ["packets/**/*.ts", "schemas/**/*.json", "shared/**/*.ts"]
14
+ }
package/bun.lockb DELETED
Binary file