@hrc/type-utils
Type utilities used by the following packages of hrc:
Installation
npm install -D @hrc/type-utilspnpm add -D @hrc/type-utilsyarn add -D @hrc/type-utilsUsage
import type { Simplify } from "@hrc/type-utils";
type MyType = { a: number; b: string;};
type AnotherType = { c: boolean; d: number;};
type FlattenedType = Simplify<MyType & AnotherType>;Utilities
Simplify- Use to flatten the type output to improve type hints shown in editors
Common Props
Color- Color variantsSize- Size variants