API reference › @evolu/common › Types › Simplify
type Simplify<T> = { [K in keyof T]: T[K] } & {};
Defined in: packages/common/src/Types.ts:347
Simplify an intersection type into a single mapped type.
This utility forces TypeScript to "flatten" an intersection type into a single object type so that tooltips and error messages are easier to read.
Flattening an intersection
import { assertType, type Simplify } from "@evolu/common";
type A = { a: string } & { b: number };
type B = Simplify<A>;
assertType<
{
a: string;
b: number;
},
B
>();