Skip to content

Commit

Permalink
TaskOption: add missing FromEither instance
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed May 14, 2021
1 parent 7d1887d commit dfe7db5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 21 deletions.
42 changes: 21 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ high state of flux, you're at risk of it changing without notice.

- `string`
- `split` nor returns a `ReadonlyNonEmptyArray`

Some signature changes in `2.11.0-rc.1` are causing type inference issues:

- `Array` / `ReadonlyArray`
- revert `isOutOfBound` signature change
- revert `isEmpty` signature change
- revert `size` signature change
- `Either`
- revert `exists` signature change
- revert `elem` signature change
- `These`
- revert `exists` signature change
- revert `elem` signature change
- `NonEmptyArray` / `ReadonlyNonEmptyArray`
- revert `isOutOfBound` signature change
- `Set` / `ReadonlySet`
- revert `isEmpty` signature change
- revert `size` signature change
- `Map` / `ReadonlyMap`
- revert `isEmpty` signature change
- revert `size` signature change
- `TaskOption`
- add missing `FromEither` instance
- some signature changes in `2.11.0-rc.1` caused type inference issues
- `Array` / `ReadonlyArray`
- revert `isOutOfBound` signature change
- revert `isEmpty` signature change
- revert `size` signature change
- `Either`
- revert `exists` signature change
- revert `elem` signature change
- `These`
- revert `exists` signature change
- revert `elem` signature change
- `NonEmptyArray` / `ReadonlyNonEmptyArray`
- revert `isOutOfBound` signature change
- `Set` / `ReadonlySet`
- revert `isEmpty` signature change
- revert `size` signature change
- `Map` / `ReadonlyMap`
- revert `isEmpty` signature change
- revert `size` signature change

# 2.11.0-rc.1

Expand Down
11 changes: 11 additions & 0 deletions docs/modules/TaskOption.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Added in v2.10.0
- [Chain](#chain)
- [Compactable](#compactable-1)
- [Filterable](#filterable-1)
- [FromEither](#fromeither)
- [FromIO](#fromio)
- [FromTask](#fromtask)
- [Functor](#functor-1)
Expand Down Expand Up @@ -667,6 +668,16 @@ export declare const Filterable: Filterable1<'TaskOption'>
Added in v2.10.0
## FromEither
**Signature**
```ts
export declare const FromEither: FromEither1<'TaskOption'>
```
Added in v2.11.0
## FromIO
**Signature**
Expand Down
9 changes: 9 additions & 0 deletions src/TaskOption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,15 @@ export const chainFirstIOK =
/*#__PURE__*/
chainFirstIOK_(FromIO, Chain)

/**
* @category instances
* @since 2.11.0
*/
export const FromEither: FromEither1<URI> = {
URI,
fromEither
}

/**
* @category instances
* @since 2.10.0
Expand Down

0 comments on commit dfe7db5

Please sign in to comment.