source: node_modules/ts-toolbelt/out/Object/ExcludeKeys.d.ts

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

Initial commit

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[d24f17c]1import { Exclude } from '../Union/Exclude';
2import { Match } from '../Any/_Internal';
3import { Is } from '../Any/Is';
4import { At } from '../Any/At';
5import { Keys } from '../Any/Keys';
6/**
7 * @hidden
8 */
9export declare type _ExcludeMatch<O extends object, O1 extends object, match extends Match> = {
10 [K in keyof O]-?: {
11 1: never;
12 0: K;
13 }[Is<O[K], At<O1, K>, match>];
14}[keyof O];
15/**
16 * @hidden
17 */
18declare type ExcludeMatch<O extends object, O1 extends object, match extends Match> = O extends unknown ? _ExcludeMatch<O, O1, match> : never;
19/**
20 * Exclude the keys of `O1` out of the keys of `O`
21 * (If `match = 'default'`, no type checks are done)
22 * @param O to remove the keys from
23 * @param O1 to remove the keys out
24 * @param match (?=`'default'`) to change precision
25 * @returns [[Key]]
26 * @example
27 * ```ts
28 * ```
29 */
30export declare type ExcludeKeys<O extends object, O1 extends object, match extends Match = 'default'> = {
31 'default': Exclude<Keys<O>, Keys<O1>>;
32 'contains->': ExcludeMatch<O, O1, 'contains->'>;
33 'extends->': ExcludeMatch<O, O1, 'extends->'>;
34 '<-contains': ExcludeMatch<O, O1, '<-contains'>;
35 '<-extends': ExcludeMatch<O, O1, '<-extends'>;
36 'equals': ExcludeMatch<O, O1, 'equals'>;
37}[match];
38export {};
Note: See TracBrowser for help on using the repository browser.