@ptolemy2002/ts-utils 2.1.0 → 2.2.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.
package/README.md CHANGED
@@ -58,6 +58,9 @@ type AdvancedConditionConstructorArgs<T> = {
58
58
  };
59
59
  ```
60
60
 
61
+ ### ValuesIntersection<T>
62
+ This type returns an intersection of all the possible values in an object of type `T`.
63
+
61
64
  ## Classes
62
65
  The following classes are available in the library:
63
66
 
package/dist/index.d.ts CHANGED
@@ -41,3 +41,6 @@ export declare function valueConditionMatches<T>(value: T, condition: OptionalVa
41
41
  export type Rename<T, K extends keyof T, N extends string> = Pick<T, Exclude<keyof T, K>> & {
42
42
  [P in N]: T[K];
43
43
  };
44
+ export type ValuesIntersection<T> = ValueOf<{
45
+ [K in keyof T]: (x: T[K]) => void;
46
+ }> extends (x: infer I) => void ? I : never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptolemy2002/ts-utils",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",