@softsky/utils 1.0.2 → 1.0.3
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/dist/types.d.ts +2 -0
- package/package.json +3 -2
package/dist/types.d.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/** Make keys in object optional */
|
|
5
5
|
export type Optional<T, K extends keyof any> = Omit<T, K & keyof T> & Partial<Pick<T, K & keyof T>>;
|
|
6
|
+
/** Get contructor type of an instance */
|
|
7
|
+
export type Constructor<T> = abstract new (..._arguments: never[]) => T;
|
|
6
8
|
/** Recursively resolves promises in objects and arrays */
|
|
7
9
|
export type AwaitedObject<T> = {
|
|
8
10
|
[K in keyof T]: T[K] extends Promise<infer U> ? U : T[K] extends object ? AwaitedObject<T[K]> : T[K];
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softsky/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "JavaScript/TypeScript utilities",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"lint": "eslint \"./src/**/*.ts\" --fix && tsc",
|
|
8
|
-
"gen-readme": "bun ./generate-readme.ts"
|
|
8
|
+
"gen-readme": "bun ./generate-readme.ts",
|
|
9
|
+
"prepare": "bun run lint && bun run gen-readme"
|
|
9
10
|
},
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|