Skip to content

Commit

Permalink
feat: as and asUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
sukovanej committed May 18, 2023
1 parent be3acab commit 896a28b
Show file tree
Hide file tree
Showing 28 changed files with 565 additions and 9 deletions.
29 changes: 29 additions & 0 deletions docs/modules/Either.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ Added in v2.0.0
- [liftNullable](#liftnullable)
- [liftOption](#liftoption)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1306,6 +1308,33 @@ Added in v2.15.0
# mapping
## as
Maps the `Right` value of this `Either` to the specified constant value.
**Signature**
```ts
export declare const as: {
<E, A, _>(self: Either<E, _>, a: A): Either<E, A>
<E, A>(a: A): <_>(self: Either<E, _>) => Either<E, A>
}
```
Added in v2.16.0
## asUnit
Maps the `Right` value of this `Either` to the void constant value.
**Signature**
```ts
export declare const asUnit: <E, _>(self: Either<E, _>) => Either<E, void>
```
Added in v2.16.0
## bimap
Map a pair of functions over the two type arguments of the bifunctor.
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/IOEither.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ Added in v2.0.0
- [liftNullable](#liftnullable)
- [liftOption](#liftoption)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1069,6 +1071,33 @@ Added in v2.15.0

# mapping

## as

Maps the `Right` value of this `IOEither` to the specified constant value.

**Signature**

```ts
export declare const as: {
<E, A, _>(self: IOEither<E, _>, a: A): IOEither<E, A>
<E, A>(a: A): <_>(self: IOEither<E, _>) => IOEither<E, A>
}
```

Added in v2.16.0

## asUnit

Maps the `Right` value of this `IOEither` to the void constant value.

**Signature**

```ts
export declare const asUnit: <E, _>(self: IOEither<E, _>) => IOEither<E, void>
```

Added in v2.16.0

## bimap

Map a pair of functions over the two type arguments of the bifunctor.
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/IOOption.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ Added in v2.12.0
- [fromOptionK](#fromoptionk)
- [fromPredicate](#frompredicate)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [flap](#flap)
- [map](#map)
- [model](#model)
Expand Down Expand Up @@ -760,6 +762,33 @@ Added in v2.12.0
# mapping
## as
Maps the `Some` value of this `IOOption` to the specified constant value.
**Signature**
```ts
export declare const as: {
<A, _>(self: IOOption<_>, a: A): IOOption<A>
<A>(a: A): <_>(self: IOOption<_>) => IOOption<A>
}
```
Added in v2.16.0
## asUnit
Maps the `Some` value of this `IOOption` to the void constant value.
**Signature**
```ts
export declare const asUnit: <_>(self: IOOption<_>) => IOOption<void>
```
Added in v2.16.0
## flap
**Signature**
Expand Down
26 changes: 26 additions & 0 deletions docs/modules/Option.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ Added in v2.0.0
- [fromNullableK](#fromnullablek)
- [fromPredicate](#frompredicate)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [flap](#flap)
- [map](#map)
- [model](#model)
Expand Down Expand Up @@ -1151,6 +1153,30 @@ Added in v2.0.0

# mapping

## as

Maps the `Some` value of this `Option` to the specified constant value.

**Signature**

```ts
export declare const as: { <A, _>(self: Option<_>, a: A): Option<A>; <A>(a: A): <_>(self: Option<_>) => Option<A> }
```

Added in v2.16.0

## asUnit

Maps the `Some` value of this `Option` to the void constant value.

**Signature**

```ts
export declare const asUnit: <_>(self: Option<_>) => Option<void>
```

Added in v2.16.0

## flap

**Signature**
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/ReaderEither.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ Added in v2.0.0
- [liftNullable](#liftnullable)
- [liftOption](#liftoption)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1040,6 +1042,33 @@ Added in v2.15.0

# mapping

## as

Maps the `Right` value of this `ReaderEither` to the specified constant value.

**Signature**

```ts
export declare const as: {
<R, E, A, _>(self: ReaderEither<R, E, _>, a: A): ReaderEither<R, E, A>
<R, E, A>(a: A): <_>(self: ReaderEither<R, E, _>) => ReaderEither<R, E, A>
}
```

Added in v2.16.0

## asUnit

Maps the `Right` value of this `ReaderEither` to the void constant value.

**Signature**

```ts
export declare const asUnit: <R, E, _>(self: ReaderEither<R, E, _>) => ReaderEither<R, E, void>
```

Added in v2.16.0

## bimap

Map a pair of functions over the two last type arguments of the bifunctor.
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/ReaderTaskEither.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ Added in v2.0.0
- [liftNullable](#liftnullable)
- [liftOption](#liftoption)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1503,6 +1505,33 @@ Added in v2.15.0

# mapping

## as

Maps the `Right` value of this `ReaderTaskEither` to the specified constant value.

**Signature**

```ts
export declare const as: {
<R, E, A, _>(self: ReaderTaskEither<R, E, _>, a: A): ReaderTaskEither<R, E, A>
<R, E, A>(a: A): <_>(self: ReaderTaskEither<R, E, _>) => ReaderTaskEither<R, E, A>
}
```

Added in v2.16.0

## asUnit

Maps the `Right` value of this `ReaderTaskEither` to the void constant value.

**Signature**

```ts
export declare const asUnit: <R, E, _>(self: ReaderTaskEither<R, E, _>) => ReaderTaskEither<R, E, void>
```

Added in v2.16.0

## bimap

Map a pair of functions over the two last type arguments of the bifunctor.
Expand Down
31 changes: 31 additions & 0 deletions docs/modules/StateReaderTaskEither.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Added in v2.0.0
- [fromTaskEitherK](#fromtaskeitherk)
- [fromTaskK](#fromtaskk)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1046,6 +1048,35 @@ Added in v2.10.0

# mapping

## as

Maps the `Right` value of this `StateReaderTaskEither` to the specified constant value.

**Signature**

```ts
export declare const as: {
<S, R, E, A, _>(self: StateReaderTaskEither<S, R, E, _>, a: A): StateReaderTaskEither<S, R, E, A>
<S, R, E, A>(a: A): <_>(self: StateReaderTaskEither<S, R, E, _>) => StateReaderTaskEither<S, R, E, A>
}
```

Added in v2.16.0

## asUnit

Maps the `Right` value of this `StateReaderTaskEither` to the void constant value.

**Signature**

```ts
export declare const asUnit: <S, R, E, _>(
self: StateReaderTaskEither<S, R, E, _>
) => StateReaderTaskEither<S, R, E, void>
```

Added in v2.16.0

## bimap

Map a pair of functions over the two last type arguments of the bifunctor.
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/TaskEither.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ Added in v2.0.0
- [liftNullable](#liftnullable)
- [liftOption](#liftoption)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [bimap](#bimap)
- [flap](#flap)
- [map](#map)
Expand Down Expand Up @@ -1447,6 +1449,33 @@ Added in v2.15.0

# mapping

## as

Maps the `Right` value of this `TaskEither` to the specified constant value.

**Signature**

```ts
export declare const as: {
<E, A, _>(self: TaskEither<E, _>, a: A): TaskEither<E, A>
<E, A>(a: A): <_>(self: TaskEither<E, _>) => TaskEither<E, A>
}
```

Added in v2.16.0

## asUnit

Maps the `Right` value of this `TaskEither` to the void constant value.

**Signature**

```ts
export declare const asUnit: <E, _>(self: TaskEither<E, _>) => TaskEither<E, void>
```

Added in v2.16.0

## bimap

Map a pair of functions over the two type arguments of the bifunctor.
Expand Down
29 changes: 29 additions & 0 deletions docs/modules/TaskOption.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Added in v2.10.0
- [fromPredicate](#frompredicate)
- [fromTaskK](#fromtaskk)
- [mapping](#mapping)
- [as](#as)
- [asUnit](#asunit)
- [flap](#flap)
- [map](#map)
- [model](#model)
Expand Down Expand Up @@ -854,6 +856,33 @@ Added in v2.10.0
# mapping
## as
Maps the `Some` value of this `TaskOption` to the specified constant value.
**Signature**
```ts
export declare const as: {
<A, _>(self: TaskOption<_>, a: A): TaskOption<A>
<A>(a: A): <_>(self: TaskOption<_>) => TaskOption<A>
}
```
Added in v2.16.0
## asUnit
Maps the `Some` value of this `TaskOption` to the void constant value.
**Signature**
```ts
export declare const asUnit: <_>(self: TaskOption<_>) => TaskOption<void>
```
Added in v2.16.0
## flap
**Signature**
Expand Down
Loading

0 comments on commit 896a28b

Please sign in to comment.