UNPKG

ts-essentials

Version:
4 lines (3 loc) 274 B
import { OptionalKeys } from "../optional-keys"; import { Prettify } from "../prettify"; export type MarkOptional<Type, Keys extends keyof Type> = Type extends Type ? Extract<Prettify<Partial<Type> & Required<Omit<Type, Keys | OptionalKeys<Type>>>>, Partial<Type>> : never;