Fixing "any" type
This commit is contained in:
parent
9b702c75e3
commit
f8d462b0d7
4 changed files with 9 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue