PartialBy<T, K>: Omit<T, K> & Partial<Pick<T, K>>

Type Parameters

  • T

  • K extends keyof T

Description

Creates a type that is a partial of T, but with the required keys K.

Example

PartialBy<{ a: string, b: number }, 'a'>
=> { a?: string, b: number }

Generated using TypeDoc