Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed May 2, 2023
1 parent 42e3e50 commit 87331c9
Show file tree
Hide file tree
Showing 15 changed files with 670 additions and 386 deletions.
81 changes: 49 additions & 32 deletions docs/modules/Either.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Added in v2.0.0

<h2 class="text-delta">Table of contents</h2>

- [combinators](#combinators)
- [tap](#tap)
- [constructors](#constructors)
- [left](#left)
- [of](#of)
Expand Down Expand Up @@ -132,6 +134,8 @@ Added in v2.0.0
- [tryCatchK](#trycatchk)
- [legacy](#legacy)
- [chain](#chain)
- [chainFirst](#chainfirst)
- [chainFirstW](#chainfirstw)
- [chainW](#chainw)
- [lifting](#lifting)
- [fromNullableK](#fromnullablek)
Expand All @@ -154,8 +158,6 @@ Added in v2.0.0
- [isLeft](#isleft)
- [isRight](#isright)
- [sequencing](#sequencing)
- [chainFirst](#chainfirst)
- [chainFirstW](#chainfirstw)
- [chainNullableK](#chainnullablek)
- [chainOptionK](#chainoptionk)
- [chainOptionKW](#chainoptionkw)
Expand Down Expand Up @@ -203,6 +205,24 @@ Added in v2.0.0

---

# combinators

## tap

Composes computations in sequence, using the return value of one computation to determine the next computation and
keeping only the result of the first.

**Signature**

```ts
export declare const tap: {
<E1, A, E2, _>(self: Either<E1, A>, f: (a: A) => Either<E2, _>): Either<E1 | E2, A>
<A, E2, _>(f: (a: A) => Either<E2, _>): <E1>(self: Either<E1, A>) => Either<E2 | E1, A>
}
```

Added in v2.15.0

# constructors

## left
Expand Down Expand Up @@ -893,7 +913,7 @@ Added in v2.7.0
**Signature**

```ts
export declare const Chain: Chain2<'Either'>
export declare const Chain: chainable.Chain2<'Either'>
```

Added in v2.10.0
Expand Down Expand Up @@ -1102,6 +1122,32 @@ export declare const chain: <E, A, B>(f: (a: A) => Either<E, B>) => (ma: Either<

Added in v2.0.0

## chainFirst

Alias of `tap`.

**Signature**

```ts
export declare const chainFirst: <E, A, B>(f: (a: A) => Either<E, B>) => (ma: Either<E, A>) => Either<E, A>
```

Added in v2.0.0

## chainFirstW

Alias of `tap`.

**Signature**

```ts
export declare const chainFirstW: <E2, A, B>(
f: (a: A) => Either<E2, B>
) => <E1>(ma: Either<E1, A>) => Either<E2 | E1, A>
```

Added in v2.8.0

## chainW

Alias of `flatMap`.
Expand Down Expand Up @@ -1353,35 +1399,6 @@ Added in v2.0.0

# sequencing

## chainFirst

Composes computations in sequence, using the return value of one computation to determine the next computation and
keeping only the result of the first.

**Signature**

```ts
export declare const chainFirst: <E, A, B>(f: (a: A) => Either<E, B>) => (ma: Either<E, A>) => Either<E, A>
```

Added in v2.0.0

## chainFirstW

Less strict version of [`chainFirst`](#chainfirst)

The `W` suffix (short for **W**idening) means that the error types will be merged.

**Signature**

```ts
export declare const chainFirstW: <E2, A, B>(
f: (a: A) => Either<E2, B>
) => <E1>(ma: Either<E1, A>) => Either<E2 | E1, A>
```

Added in v2.8.0

## chainNullableK

**Signature**
Expand Down
49 changes: 34 additions & 15 deletions docs/modules/IO.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Added in v2.0.0

<h2 class="text-delta">Table of contents</h2>

- [combinators](#combinators)
- [tap](#tap)
- [constructors](#constructors)
- [of](#of)
- [do notation](#do-notation)
Expand All @@ -44,13 +46,13 @@ Added in v2.0.0
- [Pointed](#pointed)
- [legacy](#legacy)
- [chain](#chain)
- [chainFirst](#chainfirst)
- [mapping](#mapping)
- [flap](#flap)
- [map](#map)
- [model](#model)
- [IO (interface)](#io-interface)
- [sequencing](#sequencing)
- [chainFirst](#chainfirst)
- [flatMap](#flatmap)
- [flatten](#flatten)
- [traversing](#traversing)
Expand All @@ -75,6 +77,24 @@ Added in v2.0.0

---

# combinators

## tap

Composes computations in sequence, using the return value of one computation to determine the next computation and
keeping only the result of the first.

**Signature**

```ts
export declare const tap: {
<A, _>(self: IO<A>, f: (a: A) => IO<_>): IO<A>
<A, _>(f: (a: A) => IO<_>): (self: IO<A>) => IO<A>
}
```

Added in v2.15.0

# constructors

## of
Expand Down Expand Up @@ -175,7 +195,7 @@ Added in v2.10.0
**Signature**

```ts
export declare const Chain: Chain1<'IO'>
export declare const Chain: chainable.Chain1<'IO'>
```

Added in v2.10.0
Expand Down Expand Up @@ -254,6 +274,18 @@ export declare const chain: <A, B>(f: (a: A) => IO<B>) => (ma: IO<A>) => IO<B>

Added in v2.0.0

## chainFirst

Alias of `tap`.

**Signature**

```ts
export declare const chainFirst: <A, B>(f: (a: A) => IO<B>) => (first: IO<A>) => IO<A>
```

Added in v2.0.0

# mapping

## flap
Expand Down Expand Up @@ -295,19 +327,6 @@ Added in v2.0.0

# sequencing

## chainFirst

Composes computations in sequence, using the return value of one computation to determine the next computation and
keeping only the result of the first.

**Signature**

```ts
export declare const chainFirst: <A, B>(f: (a: A) => IO<B>) => (first: IO<A>) => IO<A>
```

Added in v2.0.0

## flatMap

**Signature**
Expand Down
81 changes: 49 additions & 32 deletions docs/modules/IOEither.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Added in v2.0.0

<h2 class="text-delta">Table of contents</h2>

- [combinators](#combinators)
- [tap](#tap)
- [constructors](#constructors)
- [left](#left)
- [leftIO](#leftio)
Expand Down Expand Up @@ -75,6 +77,8 @@ Added in v2.0.0
- [tryCatchK](#trycatchk)
- [legacy](#legacy)
- [chain](#chain)
- [chainFirst](#chainfirst)
- [chainFirstW](#chainfirstw)
- [chainW](#chainw)
- [lifting](#lifting)
- [fromEitherK](#fromeitherk)
Expand All @@ -97,11 +101,9 @@ Added in v2.0.0
- [sequencing](#sequencing)
- [chainEitherK](#chaineitherk)
- [chainEitherKW](#chaineitherkw)
- [chainFirst](#chainfirst)
- [chainFirstEitherK](#chainfirsteitherk)
- [chainFirstEitherKW](#chainfirsteitherkw)
- [chainFirstIOK](#chainfirstiok)
- [chainFirstW](#chainfirstw)
- [chainIOK](#chainiok)
- [chainOptionK](#chainoptionk)
- [chainOptionKW](#chainoptionkw)
Expand Down Expand Up @@ -144,6 +146,24 @@ Added in v2.0.0

---

# combinators

## tap

Composes computations in sequence, using the return value of one computation to determine the next computation and
keeping only the result of the first.

**Signature**

```ts
export declare const tap: {
<E1, A, E2, _>(self: IOEither<E1, A>, f: (a: A) => IOEither<E2, _>): IOEither<E1 | E2, A>
<A, E2, _>(f: (a: A) => IOEither<E2, _>): <E1>(self: IOEither<E1, A>) => IOEither<E2 | E1, A>
}
```

Added in v2.15.0

# constructors

## left
Expand Down Expand Up @@ -619,7 +639,7 @@ Added in v2.7.0
**Signature**

```ts
export declare const Chain: Chain2<'IOEither'>
export declare const Chain: chainable.Chain2<'IOEither'>
```

Added in v2.10.0
Expand Down Expand Up @@ -739,6 +759,32 @@ export declare const chain: <E, A, B>(f: (a: A) => IOEither<E, B>) => (ma: IOEit

Added in v2.0.0

## chainFirst

Alias of `tap`.

**Signature**

```ts
export declare const chainFirst: <E, A, B>(f: (a: A) => IOEither<E, B>) => (ma: IOEither<E, A>) => IOEither<E, A>
```

Added in v2.0.0

## chainFirstW

Alias of `tap`.

**Signature**

```ts
export declare const chainFirstW: <E2, A, B>(
f: (a: A) => IOEither<E2, B>
) => <E1>(ma: IOEither<E1, A>) => IOEither<E2 | E1, A>
```

Added in v2.8.0

## chainW

Alias of `flatMap`.
Expand Down Expand Up @@ -973,19 +1019,6 @@ export declare const chainEitherKW: <E2, A, B>(

Added in v2.6.1

## chainFirst

Composes computations in sequence, using the return value of one computation to determine the next computation and
keeping only the result of the first.

**Signature**

```ts
export declare const chainFirst: <E, A, B>(f: (a: A) => IOEither<E, B>) => (ma: IOEither<E, A>) => IOEither<E, A>
```

Added in v2.0.0

## chainFirstEitherK

**Signature**
Expand Down Expand Up @@ -1020,22 +1053,6 @@ export declare const chainFirstIOK: <A, B>(f: (a: A) => I.IO<B>) => <E>(first: I

Added in v2.10.0

## chainFirstW

Less strict version of [`chainFirst`](#chainfirst).

The `W` suffix (short for **W**idening) means that the error types will be merged.

**Signature**

```ts
export declare const chainFirstW: <E2, A, B>(
f: (a: A) => IOEither<E2, B>
) => <E1>(ma: IOEither<E1, A>) => IOEither<E2 | E1, A>
```

Added in v2.8.0

## chainIOK

**Signature**
Expand Down
Loading

0 comments on commit 87331c9

Please sign in to comment.