import { Prettify } from "./prettify"; /** * Make passed properties in the passed argument optional * @example * ```ts * // { a?: string, b: number } * type T0 = PartialOnly<{ a: string, b: number }, 'a'>; * ``` */ export type PartialOnly = Prettify< Pick> & { [P in K]?: T[P]; } >; /** * Make all properties in the passed argument optional except for the passed properties * @example * ```ts * // { a: string, b?: number } * type T0 = PartialExcept<{ a: string, b: number }, 'a'>; * ``` */ export type PartialExcept = Prettify< Pick & { [P in Exclude]?: T[P]; } >;