Type Alias PartialExcept<T, K>

PartialExcept: Partial<Omit<T, K>> & Required<Pick<T, K>>

Make all properties in T optional except for the provided ones.

Type Parameters

  • T
  • K extends keyof T
type Example = { a: string; b: number; c: boolean };
type Result = PartialExcept<Example, "a">;