import { Extends } from '../../commonness/Extends'; import { If } from '../../commonness/If'; /** * * Creates a new type by excluding properties of type U from object type T. * * 객체 타입 T에서 타입이 U인 프로퍼티를 제외한 새로운 타입을 생성합니다. * * @param T - The original object type / 원본 객체 타입 * * @param U - The type of properties to exclude / 제외할 프로퍼티의 타입 * * @example * interface Model { * name: string; * count: number; * isReadonly: boolean; * isEnable: boolean; * } * * type cases = [ * Expect, { name: string, count: number }>>, * Expect, { count: number, isReadonly: boolean, isEnable: boolean }>>, * Expect, { name: string, isReadonly: boolean, isEnable: boolean }>>, * ] * * @link https://www.utilscript.site/docs/usage-object/omit-by-type * */ export type OmitByType = { [P in keyof T as If, never>, never, P>]: Exclude; };