import { Extends } from '../../commonness/Extends'; import { If } from '../../commonness/If'; /** * * Pick properties that are required in an object * * 객체에서 필수 프로퍼티만 선택하는 타입 * * @param T - The original object type / 원본 객체 타입 * * @returns Properties that are required in an object / 필수 프로퍼티만 선택하는 타입 * * @example * type cases = [ * Expect, { foo: number }>>, * Expect, { foo: undefined }>>, * ] * * @link https://www.utilscript.site/docs/usage-object/pick-by-required * */ export type PickByRequired = { [K in keyof T as If, Pick, K>>, K, never>]: T[K]; };