clean-jsdoc-theme TypeDoc APIv0.0.0

RequiredKeys

RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>

Source: common.ts:53

Makes specific properties of T required

Type Parameters

  • T — The base type
  • K extends keyof T — Keys to make required

Example

CODE
interface Config {
  host?: string
  port?: number
  debug?: boolean
}

type RequiredConfig = RequiredKeys<Config, 'host' | 'port'>
// { host: string; port: number; debug?: boolean }