Package: effect
Module: Struct
Flattens intersection types into a single object type for readability.
When to use
Use when hovering over a type shows A & B & C instead of the merged shape.
Details
This helper is purely cosmetic at the type level and has no runtime effect.
It preserves readonly modifiers; use Mutable to strip them.
Example (Flattening an intersection)
import type { Struct } from "effect"
type Original = { a: string } & { b: number }
// Without Simplify, the type displays as `{ a: string } & { b: number }`
type Simplified = Struct.Simplify<Original>
// { a: string; b: number }
See
Mutable – also flattens but removes readonlyAssign – merges two types with right-side precedenceSignature
type { [K in keyof T]: T[K]; } = { [K in keyof T]: T[K] } & {}
Since v4.0.0