Skip to content

Commit

Permalink
consolidate Rx constructors (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart authored Nov 29, 2023
1 parent 93cfc4a commit c7dfc46
Show file tree
Hide file tree
Showing 8 changed files with 599 additions and 654 deletions.
6 changes: 6 additions & 0 deletions .changeset/hot-jokes-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@effect-rx/rx": minor
"@effect-rx/rx-react": minor
---

consolidate Rx constructors
12 changes: 6 additions & 6 deletions docs/rx-react/index.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Added in v1.0.0
**Signature**
```ts
export declare const useRxRefresh: <A>(rx: any) => () => void
export declare const useRxRefresh: <A>(rx: Rx.Rx<A> & Rx.Refreshable) => () => void
```
Added in v1.0.0
Expand Down Expand Up @@ -144,7 +144,7 @@ Added in v1.0.0
export declare const useRxSuspense: <E, A>(
rx: Rx.Rx<Result.Result<E, A>>,
options?: { readonly suspendOnWaiting?: boolean }
) => any
) => Result.Success<E, A> | Result.Failure<E, A>
```
Added in v1.0.0
Expand Down Expand Up @@ -181,7 +181,7 @@ Re-exports all named exports from the "@effect-rx/rx/Registry" module as `Regist
**Signature**
```ts
export * as Registry from '@effect-rx/rx/Registry'
export * as Registry from "@effect-rx/rx/Registry"
```

Added in v1.0.0
Expand All @@ -193,7 +193,7 @@ Re-exports all named exports from the "@effect-rx/rx/Result" module as `Result`.
**Signature**

```ts
export * as Result from '@effect-rx/rx/Result'
export * as Result from "@effect-rx/rx/Result"
```

Added in v1.0.0
Expand All @@ -205,7 +205,7 @@ Re-exports all named exports from the "@effect-rx/rx/Rx" module as `Rx`.
**Signature**

```ts
export * as Rx from '@effect-rx/rx/Rx'
export * as Rx from "@effect-rx/rx/Rx"
```

Added in v1.0.0
Expand All @@ -217,7 +217,7 @@ Re-exports all named exports from the "@effect-rx/rx/RxRef" module as `RxRef`.
**Signature**

```ts
export * as RxRef from '@effect-rx/rx/RxRef'
export * as RxRef from "@effect-rx/rx/RxRef"
```

Added in v1.0.0
14 changes: 7 additions & 7 deletions docs/rx/Result.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Added in v1.0.0
```ts
export interface Failure<E, A> extends Result.Proto<E, A> {
readonly _tag: 'Failure'
readonly _tag: "Failure"
readonly cause: Cause.Cause<E>
readonly previousValue: Option.Option<A>
}
Expand All @@ -251,7 +251,7 @@ Added in v1.0.0

```ts
export interface Initial<E, A> extends Result.Proto<E, A> {
readonly _tag: 'Initial'
readonly _tag: "Initial"
}
```

Expand Down Expand Up @@ -315,10 +315,10 @@ Added in v1.0.0
export type With<R extends Result<any, any>, E, A> = R extends Initial<infer _E, infer _A>
? Initial<E, A>
: R extends Success<infer _E, infer _A>
? Success<E, A>
: R extends Failure<infer _E, infer _A>
? Failure<E, A>
: never
? Success<E, A>
: R extends Failure<infer _E, infer _A>
? Failure<E, A>
: never
```
Added in v1.0.0
Expand All @@ -329,7 +329,7 @@ Added in v1.0.0
```ts
export interface Success<E, A> extends Result.Proto<E, A> {
readonly _tag: 'Success'
readonly _tag: "Success"
readonly value: A
}
```
Expand Down
Loading

0 comments on commit c7dfc46

Please sign in to comment.