effect-io-ai

Package: effect
Module: Types

Types.MergeLeft

Left-biased merge of two object types where keys from Source take precedence over Target on conflict.

When to use

Use when you want left-biased merging where the first argument wins.

Details

Implemented as MergeRight<Target, Source>.

Example (Merging with left bias)

import type { Types } from "effect"

type Result = Types.MergeLeft<
  { a: number; b: number },
  { a: string; c: boolean }
>
// { a: number; b: number; c: boolean }

See

Signature

type MergeLeft<Source, Target> = MergeRight<Target, Source>

Source

Since v2.0.0