@augment-vir/core 31.29.0 → 31.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function getObjectTypedKeys<const ObjectGeneric>(input: ObjectGeneric): Array<keyof ObjectGeneric>;
|
|
11
11
|
/**
|
|
12
|
-
* Performs `keyof` on all keys within the `
|
|
13
|
-
* `Matcher`.
|
|
12
|
+
* Performs `keyof` on all keys within the `Original` that have values matching the given `Matcher`.
|
|
14
13
|
*
|
|
15
14
|
* @category Object
|
|
16
15
|
* @category Package : @augment-vir/common
|
|
@@ -25,8 +24,8 @@ export declare function getObjectTypedKeys<const ObjectGeneric>(input: ObjectGen
|
|
|
25
24
|
*
|
|
26
25
|
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
27
26
|
*/
|
|
28
|
-
export type ExtractKeysWithMatchingValues<
|
|
29
|
-
[
|
|
27
|
+
export type ExtractKeysWithMatchingValues<Original, Matcher> = keyof {
|
|
28
|
+
[Key in keyof Original as Original[Key] extends Matcher ? Key : Matcher extends Original[Key] ? Key : never]: Key;
|
|
30
29
|
};
|
|
31
30
|
/**
|
|
32
31
|
* Performs `keyof` on all keys within the `OriginalObject` that have values _not_ matching the
|
|
@@ -45,6 +44,6 @@ export type ExtractKeysWithMatchingValues<OriginalObject extends object, Matcher
|
|
|
45
44
|
*
|
|
46
45
|
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
47
46
|
*/
|
|
48
|
-
export type ExcludeKeysWithMatchingValues<
|
|
49
|
-
[
|
|
47
|
+
export type ExcludeKeysWithMatchingValues<Original, Matcher> = keyof {
|
|
48
|
+
[Key in keyof Original as Original[Key] extends Matcher ? never : Matcher extends Original[Key] ? never : Key]: Key;
|
|
50
49
|
};
|