source: node_modules/ts-toolbelt/out/Object/P/Omit.d.ts@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 816 bytes
Line 
1import { Key } from '../../Any/Key';
2import { _Omit as _OOmit } from '../Omit';
3import { _Omit as _LOmit } from '../../List/Omit';
4import { List } from '../../List/List';
5import { BuiltIn } from '../../Misc/BuiltIn';
6import { Tail } from '../../List/Tail';
7/**
8 * @hidden
9 */
10declare type OmitAt<O, Path extends List<Key>> = O extends BuiltIn ? O : Path extends [Key] ? O extends List ? _LOmit<O, Path[0]> : O extends object ? _OOmit<O, Path[0]> : O : {
11 [K in keyof O]: K extends Path[0] ? OmitAt<O[K], Tail<Path>> : O[K];
12};
13/**
14 * Remove out of `O` the fields at `Path`
15 * @param O to remove from
16 * @param Path to be followed
17 * @returns [[Object]]
18 * @example
19 * ```ts
20 * ```
21 */
22export declare type Omit<O extends object, Path extends List<Key>> = Path extends unknown ? OmitAt<O, Path> : never;
23export {};
Note: See TracBrowser for help on using the repository browser.