@softsky/utils 1.1.1 → 1.1.2
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 +1 -1
- package/dist/types.d.ts +1 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,7 +125,7 @@ Find next cron tick after passed date
|
|
|
125
125
|
Damn, I **love** TypeScript.
|
|
126
126
|
### type Optional
|
|
127
127
|
Make keys in object optional
|
|
128
|
-
### type
|
|
128
|
+
### type RequiredKey
|
|
129
129
|
Make keys in object required
|
|
130
130
|
### type Constructor
|
|
131
131
|
Get contructor type of an instance
|
package/dist/types.d.ts
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
/** Make keys in object optional */
|
|
5
5
|
export type Optional<T, K extends keyof T> = Omit<T, K & keyof T> & Partial<Pick<T, K & keyof T>>;
|
|
6
6
|
/** Make keys in object required */
|
|
7
|
-
export type
|
|
8
|
-
[P in K]-?: T[P];
|
|
9
|
-
};
|
|
7
|
+
export type RequiredKey<T, K extends keyof T> = Omit<T, K & keyof T> & Required<Pick<T, K & keyof T>>;
|
|
10
8
|
/** Get contructor type of an instance */
|
|
11
9
|
export type Constructor<T> = abstract new (..._arguments: never[]) => T;
|
|
12
10
|
/** Recursively resolves promises in objects and arrays */
|