Skip to content

Commit c950b98

Browse files
committed
docs: Adjust grammatical errors in gateways.md
1 parent 7dfe116 commit c950b98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/websockets/gateways.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ handleEvent(data, client) {
122122

123123
> info **Hint** `@ConnectedSocket()` decorator is imported from `@nestjs/websockets` package.
124124
125-
However, in this case, you won't be able to leverage interceptors. If you don't want to respond to the user, you can simple skip the `return` statement (or explicitly return "falsy" value, e.g. `undefined`).
125+
However, in this case, you won't be able to leverage interceptors. If you don't want to respond to the user, you can simply skip the `return` statement (or explicitly return a "falsy" value, e.g. `undefined`).
126126

127127
Now when a client emits the message as follows:
128128

@@ -138,7 +138,7 @@ socket.emit('events', { name: 'Nest' }, (data) => console.log(data));
138138

139139
#### Multiple responses
140140

141-
The acknowledgment is dispatched only once. Furthermore, it is not supported by native WebSockets implementation. To solve this limitation, you may return an object which consist of two properties. The `event` which is a name of the emitted event and the `data` that has to be forwarded to the client.
141+
The acknowledgment is dispatched only once. Furthermore, it is not supported by native WebSockets implementation. To solve this limitation, you may return an object which consists of two properties. The `event` which is a name of the emitted event and the `data` that has to be forwarded to the client.
142142

143143
```typescript
144144
@@filename(events.gateway)
@@ -158,7 +158,7 @@ handleEvent(data) {
158158

159159
> info **Hint** The `WsResponse` interface is imported from `@nestjs/websockets` package.
160160
161-
> warning **Warning** You should return a class instance that implements `WsResponse` if your `data` field relies on `ClassSerializerInterceptor`, as it ignores plain JavaScript objects responses.
161+
> warning **Warning** You should return a class instance that implements `WsResponse` if your `data` field relies on `ClassSerializerInterceptor`, as it ignores plain JavaScript object responses.
162162
163163
In order to listen for the incoming response(s), the client has to apply another event listener.
164164

0 commit comments

Comments
 (0)