import type { Intrinsic } from "./intrinsic.js"; /** * Value type that can be either a concrete value T or an Intrinsic */ export type Value = T | Intrinsic; /** * Converts all properties of T to Value types * * @example * ```ts * interface Props { name: string; count: number } * type ValueProps = AllValues * // Result: { name: Value; count: Value } * ``` */ export type AllValues = { [K in keyof T]: Value; }; /** * Makes specific properties K of T be Value types while keeping others unchanged * * @example * ```ts * interface Props { name: string; count: number; enabled: boolean } * type ValueProps = PartialValues * // Result: { name: Value; count: Value; enabled: boolean } * ``` */ export type PartialValues = { [P in keyof T]: P extends K ? Value : T[P]; }; /** * Makes specific properties K of T required while keeping others unchanged * * @example * ```ts * interface Props { name?: string; count?: number; enabled?: boolean } * type RequiredNameProps = RequiredProps * // Result: { name: string; count?: number; enabled?: boolean } * ``` */ type Prettify = { [P in keyof T]: T[P]; } & {}; export type RequiredProps = Prettify & Required>>; export {}; //# sourceMappingURL=types.d.ts.map