Fixing "any" type

This commit is contained in:
David Négrier 2020-09-15 10:10:35 +02:00
parent 9b702c75e3
commit f8d462b0d7
4 changed files with 9 additions and 9 deletions

View file

@ -41,7 +41,7 @@ enum SockerIoEvent {
BATCH = "batch",
}
function emitInBatch(socket: ExSocketInterface, event: string | symbol, payload: any): void {
function emitInBatch(socket: ExSocketInterface, event: string | symbol, payload: unknown): void {
socket.batchedMessages.push({ event, payload});
if (socket.batchTimeout === null) {
@ -169,7 +169,7 @@ export class IoSocketController {
const client : ExSocketInterface = socket as ExSocketInterface;
client.batchedMessages = [];
client.batchTimeout = null;
client.emitInBatch = (event: string | symbol, payload: any): void => {
client.emitInBatch = (event: string | symbol, payload: unknown): void => {
emitInBatch(client, event, payload);
}
this.sockets.set(client.userId, client);