Hyperlinkv0.8.0-beta.28

Types

Types.Simplifytypeeffect/Types.ts:250
Simplify<A>

Flattens an intersection type into a single object type for readability.

When to use

Use to clean up IDE tooltips that show A & B & C instead of a merged object.

Details

Does not change the type semantically, only its display.

Example (Simplifying an intersection)

import type { Types } from "effect"

// Without Simplify: IDE shows { a: number } & { b: string }
// With Simplify: IDE shows { a: number; b: string }
type Clean = Types.Simplify<{ a: number } & { b: string }>
Source effect/Types.ts:2503 lines
export type Simplify<A> = {
  [K in keyof A]: A[K]
} extends infer B ? B : never
Referenced by 7 symbols