@ktarmyshov/typesafe-utilities 0.2.3 → 0.3.1
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 -0
- package/dist/partial.d.ts +4 -4
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
[](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_typesafe-utilities)
|
|
5
5
|
[](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_typesafe-utilities)
|
|
6
6
|
[](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_typesafe-utilities)
|
|
7
|
+
[](https://socket.dev/npm/package/@ktarmyshov/typesafe-utilities/overview)
|
|
7
8
|
|
|
8
9
|
# typesafe-utilities
|
|
9
10
|
|
package/dist/partial.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
[K in keyof T]?:
|
|
3
|
-
} : T extends (infer U)[] ?
|
|
4
|
-
export type
|
|
1
|
+
type PartialDeepImpl<T> = T extends Record<string, unknown> ? {
|
|
2
|
+
[K in keyof T]?: PartialDeepImpl<T[K]>;
|
|
3
|
+
} : T extends (infer U)[] ? PartialDeepImpl<U>[] : T;
|
|
4
|
+
export type PartialDeep<T extends Record<string, unknown>> = PartialDeepImpl<T>;
|
|
5
5
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ktarmyshov/typesafe-utilities",
|
|
3
3
|
"description": "Type-safe utilities for working in TypeScript. For example, a type-safe property path type, deep partial type, etc.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Konstantin Tarmyshov",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "rimraf ./dist && tsc && npm run prepack",
|
|
30
30
|
"build:release": "rimraf ./dist && tsc --project tsconfig-release.json && npm run prepack",
|
|
31
|
-
"prepare": "echo This script is called after 'npm ci' or 'npm install'",
|
|
32
31
|
"prepack": "publint",
|
|
33
32
|
"format": "prettier --write .",
|
|
34
33
|
"lint": "prettier --check . && eslint .",
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"@changesets/cli": "^2.28.1",
|
|
52
51
|
"@eslint/compat": "^1.2.7",
|
|
53
|
-
"@types/node": "^
|
|
52
|
+
"@types/node": "^24.0.1",
|
|
54
53
|
"eslint": "^9.22.0",
|
|
55
54
|
"eslint-config-prettier": "^10.1.1",
|
|
56
55
|
"prettier": "^3.5.3",
|