Skip to content

Commit

Permalink
refactor: ♻️ fix anti-patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardDorian committed Aug 3, 2022
1 parent 81ff5fa commit 27cd9aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/protocol/client/ModSettingsPacket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface ModSettings {
settings: {
[key in LunarMod]?: {
enabled: boolean;
properties: { [key: string]: any };
properties: { [key: string]: unknown };
};
};
}
4 changes: 3 additions & 1 deletion src/util/deprecatePacket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { deprecate } from 'node:util';
* @param packet Packet to deprecate
* @returns The deprecated packet
*/
export default function deprecatePacket<T extends Function>(packet: T): T {
export default function deprecatePacket<T extends { new (): unknown }>(
packet: T
): T {
return deprecate(
packet,
`Packet ${packet.name} not handled by the official Lunar Client`,
Expand Down

0 comments on commit 27cd9aa

Please sign in to comment.