Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

321
Views
TypeError: this.io.in(...).emit no es una función

Me burlé y emit in probar this.io.in(room).emit(eventName, result); usando broma

this.io.in(room).emit(eventName, result);

this.io.in(room) está funcionando bien pero no estoy seguro de cómo lidiar con .emit(eventName, result);

aquí está el código

 export interface ServerToClientEvents { [EVENTNAME]: (payload: payload[]) => void; }
 import { BroadcastOperator, Server } from "socket.io"; import { ServerToClientEvents } from "../../common/Interfaces"; export class MockIo extends Server { hasEmitted = false; hasEmittedData: string[] = []; hasEmittedEventName: string | symbol = ""; room: string | string[]; constructor() { super(); } emit(event: string | symbol, ...args: any[]): boolean { this.hasEmitted = true; this.hasEmittedData = args; this.hasEmittedEventName = event; return true; } in(room: string | string[]): BroadcastOperator<ServerToClientEvents,any> { this.room = room; return this.emit.bind(this) ; } }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!