@ktarmyshov/typesafe-utilities 0.2.2 → 0.3.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/LICENSE +1 -1
- package/README.md +7 -5
- package/dist/partial.d.ts +4 -4
- package/package.json +6 -4
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright 2025 [Contributors](https://github.com/kt-
|
|
1
|
+
Copyright 2025 [Contributors](https://github.com/kt-npm-modules/typesafe-utilities/graphs/contributors)
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
[](https://www.npmjs.com/package/@ktarmyshov/typesafe-utilities)
|
|
2
|
+
[](https://github.com/kt-npm-modules/typesafe-utilities/actions/workflows/ci.yml)
|
|
3
|
+
[](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_typesafe-utilities)
|
|
4
|
+
[](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_typesafe-utilities)
|
|
5
|
+
[](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_typesafe-utilities)
|
|
6
|
+
[](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_typesafe-utilities)
|
|
7
|
+
[](https://socket.dev/npm/package/@ktarmyshov/typesafe-utilities/overview)
|
|
6
8
|
|
|
7
9
|
# typesafe-utilities
|
|
8
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.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Konstantin Tarmyshov",
|
|
@@ -17,15 +17,17 @@
|
|
|
17
17
|
"property-path",
|
|
18
18
|
"deep partial"
|
|
19
19
|
],
|
|
20
|
-
"homepage": "https://github.com/kt-
|
|
20
|
+
"homepage": "https://github.com/kt-npm-modules/typesafe-utilities#readme",
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
23
|
-
"url": "git+https://github.com/kt-
|
|
23
|
+
"url": "git+https://github.com/kt-npm-modules/typesafe-utilities.git"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/kt-npm-modules/typesafe-utilities/issues"
|
|
24
27
|
},
|
|
25
28
|
"scripts": {
|
|
26
29
|
"build": "rimraf ./dist && tsc && npm run prepack",
|
|
27
30
|
"build:release": "rimraf ./dist && tsc --project tsconfig-release.json && npm run prepack",
|
|
28
|
-
"prepare": "echo This script is called after 'npm ci' or 'npm install'",
|
|
29
31
|
"prepack": "publint",
|
|
30
32
|
"format": "prettier --write .",
|
|
31
33
|
"lint": "prettier --check . && eslint .",
|