@naturalcycles/js-lib 14.112.0 → 14.113.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/dist/types.d.ts +4 -0
- package/dist/types.js +5 -1
- package/dist-esm/types.js +4 -0
- package/package.json +1 -2
- package/src/types.ts +8 -0
package/dist/types.d.ts
CHANGED
|
@@ -196,3 +196,7 @@ export declare type FalsyValue = false | '' | 0 | null | undefined;
|
|
|
196
196
|
* }
|
|
197
197
|
*/
|
|
198
198
|
export declare function _typeCast<T>(v: any): asserts v is T;
|
|
199
|
+
/**
|
|
200
|
+
* Type-safe Object.assign that checks that part is indeed a Partial<T>
|
|
201
|
+
*/
|
|
202
|
+
export declare const _objectAssign: <T extends AnyObject>(target: T, part: Partial<T>) => T;
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._typeCast = exports._objectKeys = exports._stringMapEntries = exports._stringMapValues = exports._passNothingPredicate = exports._passthroughPredicate = exports._noop = exports._passUndefinedMapper = exports._passthroughMapper = exports.SKIP = exports.END = void 0;
|
|
3
|
+
exports._objectAssign = exports._typeCast = exports._objectKeys = exports._stringMapEntries = exports._stringMapValues = exports._passNothingPredicate = exports._passthroughPredicate = exports._noop = exports._passUndefinedMapper = exports._passthroughMapper = exports.SKIP = exports.END = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Symbol to indicate END of Sequence.
|
|
6
6
|
*/
|
|
@@ -50,3 +50,7 @@ exports._objectKeys = Object.keys;
|
|
|
50
50
|
*/
|
|
51
51
|
function _typeCast(v) { }
|
|
52
52
|
exports._typeCast = _typeCast;
|
|
53
|
+
/**
|
|
54
|
+
* Type-safe Object.assign that checks that part is indeed a Partial<T>
|
|
55
|
+
*/
|
|
56
|
+
exports._objectAssign = Object.assign;
|
package/dist-esm/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/js-lib",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.113.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepare": "husky install",
|
|
6
6
|
"build-prod": "build-prod-esm-cjs",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"@naturalcycles/nodejs-lib": "^12.33.4",
|
|
17
17
|
"@naturalcycles/time-lib": "^3.5.1",
|
|
18
18
|
"@types/node": "^18.0.0",
|
|
19
|
-
"expect-type": "^0.14.2",
|
|
20
19
|
"jest": "^29.0.0",
|
|
21
20
|
"prettier": "^2.1.2",
|
|
22
21
|
"rxjs": "^7.0.1",
|
package/src/types.ts
CHANGED
|
@@ -260,3 +260,11 @@ export type FalsyValue = false | '' | 0 | null | undefined
|
|
|
260
260
|
* }
|
|
261
261
|
*/
|
|
262
262
|
export function _typeCast<T>(v: any): asserts v is T {}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Type-safe Object.assign that checks that part is indeed a Partial<T>
|
|
266
|
+
*/
|
|
267
|
+
export const _objectAssign = Object.assign as <T extends AnyObject>(
|
|
268
|
+
target: T,
|
|
269
|
+
part: Partial<T>,
|
|
270
|
+
) => T
|