Skip to content

Commit

Permalink
fix(examples): typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN committed Jul 20, 2022
1 parent c83a71c commit 0caa051
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/client/list/client-reconnect.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { h,onMount } from 'easyhard'
import { WebSocketState } from 'easyhard-bridge'
import { ConnectionState } from 'easyhard-bridge'
import { easyhardClient } from 'easyhard-client'
import { defer, interval, of } from 'rxjs'
import { retry, scan } from 'rxjs/operators'
Expand Down Expand Up @@ -50,8 +50,8 @@ function App() {
h('div', {}, withOb1),
h('div', {}, withOb2),
'State: ', client.state.pipe(
scan((acc, item) => item === null ? acc : ([...acc, item]), [] as WebSocketState[]),
map(items => items.map(item => WebSocketState[item]).filter(item => item).map(item => item.toLowerCase()).join('; '))
scan((acc, item) => item === null ? acc : ([...acc, item]), [] as ConnectionState[]),
map(items => items.map(item => ConnectionState[item]).filter(item => item).map(item => item.toLowerCase()).join('; '))
)
)

Expand Down
4 changes: 2 additions & 2 deletions examples/client/list/post-message-worker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { interval, map, mapTo, Observable, OperatorFunction, pipe, tap } from 'rxjs'
import { easyhardResponser } from 'easyhard-post-message'
import 'easyhard-post-message'
import { interval, map, mapTo, Observable, OperatorFunction, pipe, tap } from 'rxjs'


type M = {
getData: Observable<number>
Expand Down

0 comments on commit 0caa051

Please sign in to comment.