/** * Remove the specified Keys of T. Like Omit, but with autocompletion. * * @example * type SomeProps = {field1: string; field2: string}; * const x: Remove = {field1: 'Hello, World!'}; */ export declare type Remove = Pick>; /** * Include only the specified Keys of T. * * @example * type SomeProps = {field1: string; field2: string}; * const x: Include = {field2: 'Hello, World!'}; */ export declare type Include = Pick>; /** * Extract the common item type in array of similar items T. * * @example * const x = [{a: 'a', b: 'b'}, {a: 'aa', b: 'bb'}]; * const y: ItemOf = {a: 'Hello'; b: 'World'}; */ export declare type ItemOf = T[number]; /** * Extracts an array of argument types of T. * * @example * const x = (a: string, b: number) => a + b; * const x: ArgumentTypes = ['Hello, World!', 100]; */ export declare type ArgumentTypes = T extends (...args: infer A) => any ? A : never; /** * Requires at least one of the specified Keys of T. If no keys provided, will * require at least one of any keyof T. * * @example * type SomeProps = {field1?: string; field2?: string}; * const x: RequireAtLeastOne = {field1: 'Hello, World!'}; */ export declare type RequireAtLeastOne = Remove & { [K in Keys]-?: Required> & Partial>>; }[Keys];