Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hyogwa/src/utils.ts>Simplify

Natural 🌿 effect system that fits TypeScript
Latest
type alias Simplify
import { type Simplify } from "https://deno.land/x/hyogwa@v0.1.0-rc.4/src/utils.ts";

Simplifies given type.

Having typescript to eagerly compute intersection types, simplifies given type. This works shallowly. In case we need more complex simplifications, then extend this utility to solve it. i.e. Add 'depth' parameter like Array#flat's one to this type.

definition: T extends unknown ? [K in keyof T]: T[K] : never