• Blog
  • Changelog
  • Follow us on GitHubFollow us on XJoin our Discord server
  • Blog
  • GitHub
  • Releases
  • Getting started

    • Quickstart
  • Library

    • Result
    • Type
    • Dependency injection
    • Conventions
  • Local-first

    • Examples
    • Protocol
    • Relay
    • Owner
    • Indexes
    • Migrations
    • Patterns
    • Time travel
    • Privacy
    • FAQ
  • Other

    • API reference
    • Comparison
    • Showcase
    • Changelog

API reference / @evolu/common / Result / err

Function: err()

function err<E>(error): Err<E>;

Defined in: packages/common/src/Result.ts:338

Creates an Err result.

Example

const failure = err("Something went wrong");
console.log(failure); // { ok: false, error: "Something went wrong" }

Type Parameters

Type Parameter
E

Parameters

ParameterType
errorE

Returns

Err<E>

Was this page helpful?

© Copyright 2025. All rights reserved.

Follow us on GitHubFollow us on XJoin our Discord server