Type Alias WithRequired<Source, Keys>

WithRequired<Source, Keys>: {
    [K in Exclude<keyof Source, Keys>]: Source[K]
} & {
    [K in Extract<keyof Source, Keys>]-?: Exclude<Source[K], undefined>
}

Represents a type that adds the required modifier to the keys passed.

Type Parameters

  • Source
  • Keys extends keyof Source