Skip to content

Commit

Permalink
chore: ofPromise and ofFunc are now marked as deprecated and will…
Browse files Browse the repository at this point in the history
… be removed in the next major version.

Use `ofEither`, `ofSuccess`, or `ofError` instead.
  • Loading branch information
atheck committed Jul 29, 2024
1 parent febb4c0 commit 8a529ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,6 @@ You can call one of the functions of that object:
| `cmd.ofEither` | Calls a function (sync or async) and maps the result into a message. |
| `cmd.ofSuccess` | Same as `ofEither` but ignores the error case. |
| `cmd.ofError` | Same as `ofEither` but ignores the success case. |
| `cmd.ofFunc.either` | Calls a synchronous function and maps the result into a message. |
| `cmd.ofFunc.perform` | Same as `either` but ignores the error case. |
| `cmd.ofFunc.attempt` | Same as `either` but ignores the success case. |
| `cmd.ofPromise.either` | Calls an async function and maps the result into a message. |
| `cmd.ofPromise.perform` | Same as `either` but ignores the error case. |
| `cmd.ofPromise.attempt` | Same as `either` but ignores the success case. |
| `cmd.ofSub` | Use this function to trigger a command in a subscription. |
### Dispatch a message
Expand Down
2 changes: 2 additions & 0 deletions src/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const cmd = {

/**
* Provides functionalities to create commands from simple functions.
* @deprecated Use `ofEither`, `ofSuccess`, or `ofError` instead.
*/
ofFunc: {
/**
Expand Down Expand Up @@ -188,6 +189,7 @@ const cmd = {

/**
* Provides functionalities to create commands from async functions.
* @deprecated Use `ofEither`, `ofSuccess`, or `ofError` instead.
*/
ofPromise: {
/**
Expand Down

0 comments on commit 8a529ae

Please sign in to comment.