Skip to content

Commit

Permalink
docs: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nichita-pasecinic authored and insidewhy committed Dec 28, 2022
1 parent cc4f9ae commit 35f0dee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ This example shows how to use the `map` operator to handle JSON encoding of outg

```typescript
import { Observable } from 'rxjs'
import makeWebSocketObservable, { WebSocketOptions } from 'rxjs-websockets'
import makeWebSocketObservable, { WebSocketOptions, GetWebSocketResponses } from 'rxjs-websockets'

function makeJsonWebSocketObservable(
url: string,
Expand All @@ -164,7 +164,7 @@ function makeJsonWebSocketObservable(
const socket$ = makeWebSocketObservable<string>(url, options)
return socket$.pipe(
map(
(getResponses: GetWebSocketReponses<string>) => (input$: Observable<object>) =>
(getResponses: GetWebSocketResponses<string>) => (input$: Observable<object>) =>
getResponses(input$.pipe(map((request) => JSON.stringify(request)))).pipe(
map((response) => JSON.parse(response)),
),
Expand Down

0 comments on commit 35f0dee

Please sign in to comment.