* Targets a room when emitting. * * @example * // the “foo” event will be broadcast to all connected clients in the “room-101” room * io.to("room-101").emit("foo", "bar"); * * // with an array of rooms (a client will be notified at most once) * io.to(["room-101", "room-102"]).em
(room: Room | Room[])
| 888 | * @return a new {@link BroadcastOperator} instance for chaining |
| 889 | */ |
| 890 | public to(room: Room | Room[]) { |
| 891 | return this.sockets.to(room); |
| 892 | } |
| 893 | |
| 894 | /** |
| 895 | * Targets a room when emitting. Similar to `to()`, but might feel clearer in some cases: |
no outgoing calls
no test coverage detected