• 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

    • How It Works
    • Indexes
    • Migrations
    • Patterns
    • Time travel
    • Examples
  • Other

    • API Reference
    • Comparison
    • Showcase
    • FAQ
    • Changelog

API Reference / @evolu/common / Result / err

Function: err()

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

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

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