Type alias OptionalField<Type, Key>

OptionalField<Type, Key>: Omit<Type, Key> & Partial<Pick<Type, Key>>

Mark a certain key of a type as optional.

Type Parameters

  • Type extends Record<string, unknown>

  • Key extends keyof Type