@dereekb/util 12.6.20 → 12.7.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/fetch/index.cjs.js +62 -148
- package/fetch/index.esm.js +62 -148
- package/fetch/package.json +1 -1
- package/index.cjs.js +129 -210
- package/index.esm.js +129 -210
- package/package.json +1 -1
- package/src/lib/key.d.ts +4 -0
- package/src/lib/promise/promise.d.ts +2 -2
- package/src/lib/relation/relation.d.ts +3 -3
- package/test/CHANGELOG.md +8 -0
- package/test/package.json +1 -1
package/package.json
CHANGED
package/src/lib/key.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ export type ReadKeyFunction<T, K extends PrimativeKey = PrimativeKey> = MapFunct
|
|
|
17
17
|
* Reads a key value from the input object that is required to exist.
|
|
18
18
|
*/
|
|
19
19
|
export type ReadRequiredKeyFunction<T, K extends PrimativeKey = PrimativeKey> = MapFunction<T, K>;
|
|
20
|
+
/**
|
|
21
|
+
* Reads all keys from the input object. Can return null/undefined.
|
|
22
|
+
*/
|
|
23
|
+
export type ReadAllKeysFunction<T, K extends PrimativeKey = PrimativeKey> = MapFunction<T, Maybe<ArrayOrValue<K>>>;
|
|
20
24
|
/**
|
|
21
25
|
* Reads one or more keys from the input object.
|
|
22
26
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ArrayOrValue } from '../array/array';
|
|
2
2
|
import { type Milliseconds } from '../date/date';
|
|
3
|
-
import { type
|
|
3
|
+
import { type ReadAllKeysFunction, type PrimativeKey } from '../key';
|
|
4
4
|
import { type StringFactory } from '../string/factory';
|
|
5
5
|
import { type IndexNumber } from '../value';
|
|
6
6
|
import { type Maybe } from '../value/maybe.type';
|
|
@@ -95,7 +95,7 @@ export interface PerformTasksFromFactoryInParallelFunctionConfig<I, K extends Pr
|
|
|
95
95
|
*
|
|
96
96
|
* When in use the order is not guranteed.
|
|
97
97
|
*/
|
|
98
|
-
readonly nonConcurrentTaskKeyFactory?:
|
|
98
|
+
readonly nonConcurrentTaskKeyFactory?: Maybe<ReadAllKeysFunction<I, K>>;
|
|
99
99
|
/**
|
|
100
100
|
* Whether or not tasks are performed sequentially or if tasks are all done in "parellel".
|
|
101
101
|
*
|
|
@@ -74,8 +74,8 @@ export interface UpdateMiltiTypeRelationConfig<T> extends UpdateRelationConfig<T
|
|
|
74
74
|
*/
|
|
75
75
|
export declare class ModelRelationUtility {
|
|
76
76
|
static modifyStringCollection(current: Maybe<RelationString[]>, change: RelationChangeType, mods: RelationString[]): RelationString[];
|
|
77
|
-
static modifyCollection<T extends RelationObject>(current: Maybe<T[]>, change: RelationChangeType, mods: T[], config: UpdateRelationConfig<T>): T[];
|
|
78
77
|
static modifyCollection<T extends RelationObject>(current: Maybe<T[]>, change: RelationChangeType, mods: T[], config: UpdateMiltiTypeRelationConfig<T>): T[];
|
|
78
|
+
static modifyCollection<T extends RelationObject>(current: Maybe<T[]>, change: RelationChangeType, mods: T[], config: UpdateRelationConfig<T>): T[];
|
|
79
79
|
/**
|
|
80
80
|
* The mask results are merged together.
|
|
81
81
|
*
|
|
@@ -83,8 +83,8 @@ export declare class ModelRelationUtility {
|
|
|
83
83
|
*/
|
|
84
84
|
private static _mergeMaskResults;
|
|
85
85
|
private static _modifyCollectionWithoutMask;
|
|
86
|
-
static updateCollection<T extends RelationObject>(current: T[], update: T[],
|
|
87
|
-
static insertCollection<T extends RelationObject>(current: T[], update: T[],
|
|
86
|
+
static updateCollection<T extends RelationObject>(current: T[], update: T[], config: UpdateRelationConfig<T> | UpdateMiltiTypeRelationConfig<T>): T[];
|
|
87
|
+
static insertCollection<T extends RelationObject>(current: T[], update: T[], config: UpdateRelationConfig<T> | UpdateMiltiTypeRelationConfig<T>): T[];
|
|
88
88
|
/**
|
|
89
89
|
* Used to modify a collection which may be multi-type. If readType is provided, the collection is handled as a multi-type map.
|
|
90
90
|
*/
|
package/test/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
# [12.7.0](https://github.com/dereekb/dbx-components/compare/v12.6.21-dev...v12.7.0) (2026-02-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [12.6.21](https://github.com/dereekb/dbx-components/compare/v12.6.20-dev...v12.6.21) (2026-02-18)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
## [12.6.20](https://github.com/dereekb/dbx-components/compare/v12.6.19-dev...v12.6.20) (2026-02-15)
|
|
6
14
|
|
|
7
15
|
|