Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Sep 19, 2023
1 parent 878bfba commit 666271e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
2 changes: 0 additions & 2 deletions docs/rx/Registry.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export interface Registry {
readonly refresh: Rx.Rx.Refresh
readonly set: Rx.Rx.Set
readonly subscribe: Rx.Rx.Subscribe
readonly subscribeWithPrevious: Rx.Rx.SubscribeWithPrevious
readonly queue: Rx.Rx.Queue
}
```

Expand Down
8 changes: 0 additions & 8 deletions docs/rx/Rx.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,6 @@ export interface Context<A> {
readonly immediate?: boolean
}
) => void
readonly subscribeWithPrevious: <A>(
rx: Rx<A>,
f: (prev: Option.Option<A>, value: A) => void,
options?: {
readonly immediate?: boolean
}
) => void
readonly queue: <A>(rx: Rx<A>) => Effect.Effect<never, never, Queue_.Dequeue<A>>
}
```

Expand Down
19 changes: 0 additions & 19 deletions packages/rx/test/Rx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as Rx from "@effect-rx/rx/Rx"
import * as Context from "@effect/data/Context"
import * as Effect from "@effect/io/Effect"
import * as Layer from "@effect/io/Layer"
import * as Queue from "@effect/io/Queue"

describe("Rx", () => {
it("get/set", () => {
Expand Down Expand Up @@ -51,24 +50,6 @@ describe("Rx", () => {
expect(r.get(counter)).toEqual(0)
})

it("queue", async () => {
const counter = Rx.state(0)
const r = Registry.make()

await Effect.gen(function*(_) {
const q = yield* _(r.queue(counter))
expect(yield* _(Queue.take(q))).toEqual(0)
r.set(counter, 1)
expect(yield* _(Queue.take(q))).toEqual(1)
yield* _(Effect.yieldNow())
expect(r.get(counter)).toEqual(1)
}).pipe(
Effect.scoped,
Effect.runPromise
)
expect(r.get(counter)).toEqual(0)
})

it("runtime", async () => {
const count = Rx.effect(
Effect.flatMap(Counter, (_) => _.get),
Expand Down

0 comments on commit 666271e

Please sign in to comment.