ok
Returns an EitherRight<"ok", never>: an empty success that confirms an operation went fine without extra data.
TIP
ok is just a specialized alias of right("ok"). To better understand building Right values (mandatory info, unwrap, helpers), see the right page.
Interactive example
Syntax
typescript
function ok(): EitherOkParameters
None. The call simply signals that “all is well.”
Return value
A Right whose info is fixed to "ok" and whose wrapped value is never. Designed for commands or side effects that have nothing to return.
Use cases
- Validate an imperative action (sending an email, mutation, scheduled job).
- Harmonize returns when some paths have nothing to return but must stay compatible with the other
Eithervalues of your function. - Work with
E.whenHasInformation(..., "ok", handler)to trigger a callback without payload.
