UnionPartialBy<T, K>: T extends any
    ? PartialBy<T, K>
    : never

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: string, b: undefined, c: number }, 'a'>
=> { a?: string, b: number } | { a?: string, b: undefined, c: number }

Generated using TypeDoc