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 | |
---|
1 | import { Key } from '../../Any/Key';
|
---|
2 | import { _Omit as _OOmit } from '../Omit';
|
---|
3 | import { _Omit as _LOmit } from '../../List/Omit';
|
---|
4 | import { List } from '../../List/List';
|
---|
5 | import { BuiltIn } from '../../Misc/BuiltIn';
|
---|
6 | import { Tail } from '../../List/Tail';
|
---|
7 | /**
|
---|
8 | * @hidden
|
---|
9 | */
|
---|
10 | declare 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 | */
|
---|
22 | export declare type Omit<O extends object, Path extends List<Key>> = Path extends unknown ? OmitAt<O, Path> : never;
|
---|
23 | export {};
|
---|
Note:
See
TracBrowser
for help on using the repository browser.