@ptolemy2002/ts-utils 1.1.0 → 1.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
@@ -33,6 +33,9 @@ This type returns a union of all the keys in `T` that have a value assignable to
33
33
  ## Peer Dependencies
34
34
  None
35
35
 
36
+ ## PartialBy<T, K extends keyof T>
37
+ This type returns a type that is the same as `T` except that the keys in `K` are optional.
38
+
36
39
  ## Commands
37
40
  The following commands exist in the project:
38
41
 
package/dist/index.d.ts CHANGED
@@ -8,3 +8,4 @@ export type TAndOthers<T, K extends keyof any = PropertyKey> = Record<K, any> &
8
8
  export type KeysMatching<T, V> = {
9
9
  [K in keyof T]-?: T[K] extends V ? K : never;
10
10
  }[keyof T];
11
+ export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptolemy2002/ts-utils",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",