UNPKG

@flex-development/tutils

Version:
16 lines (15 loc) 455 B
/** * @file Type Definitions - OmitByType * @module tutils/types/OmitByType */ import type ObjectPlain from './object-plain.mjs'; /** * Constructs a type where properties of type `P` will be omitted from `T`. * * @template T - Object type * @template P - Type of properties to omit */ declare type OmitByType<T extends ObjectPlain, P> = Pick<T, { [K in keyof T]: T[K] extends P ? never : K; }[keyof T]>; export { type OmitByType as default };