@oscarpalmer/atoms 0.221.0 → 0.223.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/array/difference.d.mts +1 -3
- package/dist/array/difference.mjs +2 -3
- package/dist/array/exists.d.mts +1 -3
- package/dist/array/exists.mjs +11 -6
- package/dist/array/filter.d.mts +1 -3
- package/dist/array/filter.mjs +15 -6
- package/dist/array/find.d.mts +1 -3
- package/dist/array/find.mjs +9 -5
- package/dist/array/first.d.mts +1 -3
- package/dist/array/first.mjs +10 -5
- package/dist/array/flatten.d.mts +1 -3
- package/dist/array/flatten.mjs +1 -2
- package/dist/array/from.d.mts +1 -3
- package/dist/array/from.mjs +1 -2
- package/dist/array/group-by.d.mts +1 -3
- package/dist/array/group-by.mjs +1 -2
- package/dist/array/index.d.mts +4 -4
- package/dist/array/insert.d.mts +1 -3
- package/dist/array/insert.mjs +2 -3
- package/dist/array/intersection.d.mts +1 -3
- package/dist/array/intersection.mjs +2 -3
- package/dist/array/last.d.mts +1 -3
- package/dist/array/last.mjs +12 -5
- package/dist/array/move.d.mts +1 -3
- package/dist/array/move.mjs +1 -2
- package/dist/array/partition.d.mts +1 -3
- package/dist/array/partition.mjs +24 -5
- package/dist/array/push.d.mts +0 -2
- package/dist/array/push.mjs +2 -3
- package/dist/array/reverse.d.mts +1 -3
- package/dist/array/reverse.mjs +1 -2
- package/dist/array/select.d.mts +0 -2
- package/dist/array/select.mjs +40 -9
- package/dist/array/single.d.mts +1 -3
- package/dist/array/single.mjs +9 -7
- package/dist/array/slice.d.mts +1 -3
- package/dist/array/slice.mjs +1 -2
- package/dist/array/sort.d.mts +0 -2
- package/dist/array/sort.mjs +2 -3
- package/dist/array/splice.d.mts +1 -3
- package/dist/array/splice.mjs +2 -3
- package/dist/array/swap.d.mts +0 -2
- package/dist/array/swap.mjs +2 -3
- package/dist/array/to-map.d.mts +1 -3
- package/dist/array/to-map.mjs +1 -2
- package/dist/array/to-record.d.mts +1 -3
- package/dist/array/to-record.mjs +1 -2
- package/dist/array/to-set.d.mts +1 -3
- package/dist/array/to-set.mjs +1 -2
- package/dist/array/toggle.d.mts +1 -3
- package/dist/array/toggle.mjs +1 -2
- package/dist/array/union.d.mts +1 -3
- package/dist/array/union.mjs +2 -3
- package/dist/array/unique.d.mts +1 -3
- package/dist/array/unique.mjs +18 -5
- package/dist/array/update.d.mts +1 -3
- package/dist/array/update.mjs +1 -2
- package/dist/beacon.d.mts +3 -13
- package/dist/beacon.mjs +10 -21
- package/dist/color/constants.d.mts +1 -7
- package/dist/color/constants.mjs +3 -11
- package/dist/color/index.d.mts +0 -2
- package/dist/color/index.mjs +4 -5
- package/dist/color/instance.d.mts +1 -3
- package/dist/color/instance.mjs +5 -8
- package/dist/color/misc/alpha.d.mts +1 -3
- package/dist/color/misc/alpha.mjs +1 -2
- package/dist/color/misc/format.d.mts +1 -3
- package/dist/color/misc/format.mjs +1 -2
- package/dist/color/misc/get.d.mts +1 -3
- package/dist/color/misc/get.mjs +2 -3
- package/dist/color/misc/is.d.mts +1 -11
- package/dist/color/misc/is.mjs +4 -16
- package/dist/color/misc/state.d.mts +1 -3
- package/dist/color/misc/state.mjs +4 -5
- package/dist/color/space/hex.d.mts +1 -3
- package/dist/color/space/hex.mjs +2 -3
- package/dist/color/space/hsl.d.mts +1 -3
- package/dist/color/space/hsl.mjs +2 -3
- package/dist/color/space/hwb.d.mts +1 -3
- package/dist/color/space/hwb.mjs +3 -4
- package/dist/color/space/rgb.d.mts +1 -3
- package/dist/color/space/rgb.mjs +1 -2
- package/dist/function/limit.d.mts +1 -3
- package/dist/function/limit.mjs +2 -3
- package/dist/function/once.d.mts +1 -3
- package/dist/function/once.mjs +8 -9
- package/dist/function/retry.d.mts +1 -3
- package/dist/function/retry.mjs +11 -12
- package/dist/herald.d.mts +2 -2
- package/dist/herald.mjs +1 -1
- package/dist/index.d.mts +81 -359
- package/dist/index.mjs +514 -661
- package/dist/internal/aborter.d.mts +1 -3
- package/dist/internal/aborter.mjs +1 -2
- package/dist/internal/array/callbacks.d.mts +2 -4
- package/dist/internal/array/callbacks.mjs +1 -2
- package/dist/internal/array/chunk.d.mts +1 -3
- package/dist/internal/array/chunk.mjs +1 -2
- package/dist/internal/array/compact.d.mts +1 -3
- package/dist/internal/array/compact.mjs +1 -2
- package/dist/internal/array/find.d.mts +2 -8
- package/dist/internal/array/find.mjs +31 -124
- package/dist/internal/array/get.d.mts +1 -3
- package/dist/internal/array/get.mjs +1 -2
- package/dist/internal/array/group.d.mts +1 -3
- package/dist/internal/array/group.mjs +1 -2
- package/dist/internal/array/index-of.d.mts +1 -3
- package/dist/internal/array/index-of.mjs +10 -5
- package/dist/internal/array/insert.d.mts +1 -3
- package/dist/internal/array/insert.mjs +2 -3
- package/dist/internal/array/match.d.mts +2 -4
- package/dist/internal/array/match.mjs +2 -3
- package/dist/internal/array/overlap.d.mts +1 -3
- package/dist/internal/array/overlap.mjs +1 -2
- package/dist/internal/array/sets.d.mts +1 -3
- package/dist/internal/array/sets.mjs +5 -6
- package/dist/internal/array/shuffle.d.mts +1 -3
- package/dist/internal/array/shuffle.mjs +1 -2
- package/dist/internal/array/update.d.mts +1 -3
- package/dist/internal/array/update.mjs +1 -2
- package/dist/internal/defaults.d.mts +1 -3
- package/dist/internal/defaults.mjs +1 -2
- package/dist/internal/function/assert.d.mts +1 -3
- package/dist/internal/function/assert.mjs +1 -2
- package/dist/internal/function/limit.d.mts +2 -4
- package/dist/internal/function/limit.mjs +8 -9
- package/dist/internal/function/memoize.d.mts +1 -3
- package/dist/internal/function/memoize.mjs +4 -5
- package/dist/internal/function/misc.d.mts +1 -2
- package/dist/internal/function/misc.mjs +7 -3
- package/dist/internal/function/work.d.mts +1 -3
- package/dist/internal/function/work.mjs +5 -13
- package/dist/internal/herald.d.mts +2 -12
- package/dist/internal/herald.mjs +9 -33
- package/dist/internal/is.d.mts +1 -3
- package/dist/internal/is.mjs +1 -2
- package/dist/internal/math/aggregate.d.mts +1 -3
- package/dist/internal/math/aggregate.mjs +2 -3
- package/dist/internal/math/misc.d.mts +1 -3
- package/dist/internal/math/misc.mjs +1 -2
- package/dist/internal/number.d.mts +1 -3
- package/dist/internal/number.mjs +2 -3
- package/dist/internal/plan/index.d.mts +1 -3
- package/dist/internal/plan/index.mjs +2 -3
- package/dist/internal/plan/plan.generate.d.mts +1 -3
- package/dist/internal/plan/plan.generate.mjs +67 -22
- package/dist/internal/random.d.mts +1 -3
- package/dist/internal/random.mjs +1 -2
- package/dist/internal/result/attempt.d.mts +1 -3
- package/dist/internal/result/attempt.mjs +1 -2
- package/dist/internal/result/misc.d.mts +1 -3
- package/dist/internal/result/misc.mjs +1 -2
- package/dist/internal/sized/map.d.mts +4 -3
- package/dist/internal/sized/map.mjs +4 -2
- package/dist/internal/sized/misc.d.mts +1 -3
- package/dist/internal/sized/misc.mjs +1 -2
- package/dist/internal/string/case.d.mts +1 -3
- package/dist/internal/string/case.mjs +3 -4
- package/dist/internal/string/misc.d.mts +1 -3
- package/dist/internal/string/misc.mjs +1 -2
- package/dist/internal/subscription.d.mts +1 -3
- package/dist/internal/subscription.mjs +16 -29
- package/dist/internal/value/compare.d.mts +1 -3
- package/dist/internal/value/compare.mjs +2 -3
- package/dist/internal/value/equal.d.mts +1 -3
- package/dist/internal/value/equal.mjs +3 -4
- package/dist/internal/value/get.d.mts +1 -3
- package/dist/internal/value/get.mjs +1 -2
- package/dist/internal/value/handlers.d.mts +1 -3
- package/dist/internal/value/handlers.mjs +1 -2
- package/dist/internal/value/has.d.mts +1 -3
- package/dist/internal/value/has.mjs +1 -2
- package/dist/internal/value/misc.d.mts +1 -3
- package/dist/internal/value/misc.mjs +2 -3
- package/dist/internal/value/partial.d.mts +1 -3
- package/dist/internal/value/partial.mjs +1 -2
- package/dist/internal/value/set.d.mts +1 -3
- package/dist/internal/value/set.mjs +2 -3
- package/dist/is.d.mts +0 -2
- package/dist/is.mjs +2 -3
- package/dist/logger.d.mts +0 -2
- package/dist/logger.mjs +7 -7
- package/dist/math.d.mts +0 -2
- package/dist/math.mjs +2 -3
- package/dist/models/aborter.model.d.mts +1 -3
- package/dist/models/aborter.model.mjs +1 -2
- package/dist/models/array/array.match.model.d.mts +1 -3
- package/dist/models/array/array.match.model.mjs +1 -2
- package/dist/models/array/array.misc.model.d.mts +11 -2
- package/dist/models/array/array.misc.model.mjs +3 -3
- package/dist/models/array/array.sort.model.d.mts +1 -3
- package/dist/models/array/array.sort.model.mjs +1 -2
- package/dist/models/beacon.model.d.mts +4 -6
- package/dist/models/beacon.model.mjs +3 -10
- package/dist/models/color.model.d.mts +2 -4
- package/dist/models/function/assert.model.d.mts +1 -3
- package/dist/models/function/assert.model.mjs +1 -2
- package/dist/models/function/limiter.model.d.mts +2 -4
- package/dist/models/function/limiter.model.mjs +2 -4
- package/dist/models/function/memoize.model.d.mts +2 -4
- package/dist/models/function/memoize.model.mjs +1 -2
- package/dist/models/function/once.model.d.mts +0 -3
- package/dist/models/function/once.model.mjs +3 -5
- package/dist/models/function/retry.model.d.mts +1 -3
- package/dist/models/function/retry.model.mjs +1 -2
- package/dist/models/function/work.model.d.mts +2 -4
- package/dist/models/function/work.model.mjs +1 -2
- package/dist/models/herald.model.d.mts +8 -7
- package/dist/models/herald.model.mjs +3 -10
- package/dist/models/index.d.mts +0 -2
- package/dist/models/logger.model.d.mts +1 -4
- package/dist/models/logger.model.mjs +3 -5
- package/dist/models/math.model.d.mts +1 -3
- package/dist/models/math.model.mjs +1 -2
- package/dist/models/misc.model.d.mts +1 -3
- package/dist/models/misc.model.mjs +1 -2
- package/dist/models/plan.model.d.mts +35 -37
- package/dist/models/plan.model.mjs +1 -2
- package/dist/models/promise.model.d.mts +8 -10
- package/dist/models/promise.model.mjs +4 -5
- package/dist/models/query.model.d.mts +1 -3
- package/dist/models/query.model.mjs +1 -2
- package/dist/models/queue.model.d.mts +0 -3
- package/dist/models/queue.model.mjs +3 -5
- package/dist/models/random.model.d.mts +1 -3
- package/dist/models/random.model.mjs +1 -2
- package/dist/models/result.model.d.mts +0 -2
- package/dist/models/string/string.case.model.d.mts +1 -3
- package/dist/models/string/string.case.model.mjs +1 -2
- package/dist/models/string/string.fuzzy.model.d.mts +0 -3
- package/dist/models/string/string.fuzzy.model.mjs +3 -5
- package/dist/models/string/string.misc.model.d.mts +1 -3
- package/dist/models/string/string.misc.model.mjs +1 -2
- package/dist/models/string/string.normalize.model.d.mts +1 -3
- package/dist/models/string/string.normalize.model.mjs +1 -2
- package/dist/models/string/string.template.model.d.mts +1 -3
- package/dist/models/string/string.template.model.mjs +1 -2
- package/dist/models/subscription.model.d.mts +4 -23
- package/dist/models/subscription.model.mjs +3 -5
- package/dist/models/value/value.clone.model.d.mts +1 -3
- package/dist/models/value/value.clone.model.mjs +1 -2
- package/dist/models/value/value.diff.model.d.mts +1 -3
- package/dist/models/value/value.diff.model.mjs +1 -2
- package/dist/models/value/value.equal.model.d.mts +0 -2
- package/dist/models/value/value.equal.model.mjs +1 -2
- package/dist/models/value/value.handler.model.d.mts +1 -3
- package/dist/models/value/value.merge.model.d.mts +0 -2
- package/dist/models/value/value.merge.model.mjs +1 -2
- package/dist/models/value/value.misc.model.d.mts +0 -2
- package/dist/models/value/value.misc.model.mjs +1 -2
- package/dist/models/value/value.transform.model.d.mts +1 -3
- package/dist/models/value/value.transform.model.mjs +1 -2
- package/dist/plan/index.d.mts +1 -3
- package/dist/plan/index.mjs +2 -3
- package/dist/plan/is.d.mts +1 -3
- package/dist/plan/is.mjs +1 -2
- package/dist/plan/misc.d.mts +1 -3
- package/dist/plan/misc.mjs +2 -3
- package/dist/plan/models.d.mts +2 -2
- package/dist/plan/result.d.mts +8 -10
- package/dist/plan/result.mjs +2 -3
- package/dist/plan/run.d.mts +8 -10
- package/dist/plan/run.mjs +2 -3
- package/dist/plan/use.d.mts +1 -3
- package/dist/plan/use.mjs +14 -9
- package/dist/promise/delay.d.mts +1 -3
- package/dist/promise/delay.mjs +2 -3
- package/dist/promise/helpers.d.mts +1 -3
- package/dist/promise/helpers.mjs +2 -3
- package/dist/promise/index.d.mts +0 -2
- package/dist/promise/index.mjs +5 -6
- package/dist/promise/misc.d.mts +1 -3
- package/dist/promise/misc.mjs +2 -3
- package/dist/promise/models.d.mts +2 -2
- package/dist/promise/models.mjs +1 -1
- package/dist/promise/timed.d.mts +1 -3
- package/dist/promise/timed.mjs +4 -5
- package/dist/query.d.mts +1 -3
- package/dist/query.mjs +2 -3
- package/dist/queue.d.mts +0 -2
- package/dist/queue.mjs +11 -12
- package/dist/random.d.mts +0 -2
- package/dist/random.mjs +2 -3
- package/dist/result/match.d.mts +1 -3
- package/dist/result/match.mjs +1 -2
- package/dist/result/misc.d.mts +0 -2
- package/dist/result/misc.mjs +1 -2
- package/dist/result/work/flow.d.mts +1 -3
- package/dist/result/work/flow.mjs +5 -12
- package/dist/result/work/pipe.d.mts +0 -2
- package/dist/result/work/pipe.mjs +2 -3
- package/dist/sized/set.d.mts +4 -3
- package/dist/sized/set.mjs +4 -2
- package/dist/string/fuzzy.d.mts +0 -2
- package/dist/string/fuzzy.mjs +5 -7
- package/dist/string/index.d.mts +0 -2
- package/dist/string/index.mjs +2 -3
- package/dist/string/match.d.mts +1 -3
- package/dist/string/match.mjs +2 -3
- package/dist/string/normalize.d.mts +0 -2
- package/dist/string/normalize.mjs +3 -4
- package/dist/string/template.d.mts +0 -2
- package/dist/string/template.mjs +1 -2
- package/dist/subscription.d.mts +2 -2
- package/dist/value/clone.d.mts +1 -3
- package/dist/value/clone.mjs +2 -3
- package/dist/value/collection.d.mts +1 -3
- package/dist/value/collection.mjs +1 -2
- package/dist/value/diff.d.mts +0 -2
- package/dist/value/diff.mjs +1 -2
- package/dist/value/freeze.d.mts +1 -3
- package/dist/value/freeze.mjs +1 -2
- package/dist/value/handle.mjs +1 -1
- package/dist/value/merge.d.mts +0 -2
- package/dist/value/merge.mjs +1 -2
- package/dist/value/omit.d.mts +1 -3
- package/dist/value/omit.mjs +1 -2
- package/dist/value/pick.d.mts +1 -3
- package/dist/value/pick.mjs +1 -2
- package/dist/value/shake.d.mts +0 -2
- package/dist/value/shake.mjs +1 -2
- package/dist/value/smush.d.mts +0 -2
- package/dist/value/smush.mjs +2 -3
- package/dist/value/transform.d.mts +0 -2
- package/dist/value/transform.mjs +1 -2
- package/dist/value/unsmush.d.mts +0 -2
- package/dist/value/unsmush.mjs +1 -2
- package/package.json +6 -6
- package/dist/models/array/array.find.model.d.mts +0 -48
- package/dist/models/array/array.find.model.mjs +0 -8
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/models/index.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* A generic array or object
|
|
4
3
|
*/
|
|
@@ -124,8 +123,6 @@ export type UnionToIntersection<Union> = (Union extends unknown ? (distributedUn
|
|
|
124
123
|
* A function that unsubscribes from a subscription
|
|
125
124
|
*/
|
|
126
125
|
export type Unsubscriber = () => void;
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/array/filter.d.ts
|
|
129
126
|
/**
|
|
130
127
|
* Get a filtered array of items that do not match the value
|
|
131
128
|
*
|
|
@@ -301,8 +298,6 @@ export declare function filter<Item>(array: Item[], item: Item): Item[];
|
|
|
301
298
|
export declare namespace filter {
|
|
302
299
|
export var remove: typeof exclude;
|
|
303
300
|
}
|
|
304
|
-
//#endregion
|
|
305
|
-
//#region src/array/find.d.ts
|
|
306
301
|
/**
|
|
307
302
|
* Get the first item matching the given value
|
|
308
303
|
*
|
|
@@ -478,8 +473,6 @@ export declare function findLast<Item>(array: Item[], value: Item): Item | undef
|
|
|
478
473
|
export declare namespace find {
|
|
479
474
|
export var last: typeof findLast;
|
|
480
475
|
}
|
|
481
|
-
//#endregion
|
|
482
|
-
//#region src/array/first.d.ts
|
|
483
476
|
/**
|
|
484
477
|
* Get the first item matching the given value
|
|
485
478
|
*
|
|
@@ -664,8 +657,6 @@ export declare function firstOrDefault<Item>(array: Item[], defaultValue: Item):
|
|
|
664
657
|
export declare namespace first {
|
|
665
658
|
export var defaulted: typeof firstOrDefault;
|
|
666
659
|
}
|
|
667
|
-
//#endregion
|
|
668
|
-
//#region src/array/group-by.d.ts
|
|
669
660
|
/**
|
|
670
661
|
* Create a record from an array of items using a specific key
|
|
671
662
|
*
|
|
@@ -765,8 +756,6 @@ export declare function groupArraysBy<Item, KeyArg extends KeyOrCallback<Item, K
|
|
|
765
756
|
export declare namespace groupBy {
|
|
766
757
|
export var arrays: typeof groupArraysBy;
|
|
767
758
|
}
|
|
768
|
-
//#endregion
|
|
769
|
-
//#region src/internal/array/chunk.d.ts
|
|
770
759
|
/**
|
|
771
760
|
* Chunk an array into smaller arrays
|
|
772
761
|
*
|
|
@@ -780,8 +769,6 @@ export declare namespace groupBy {
|
|
|
780
769
|
* ```
|
|
781
770
|
*/
|
|
782
771
|
export declare function chunk<Item>(array: Item[], size?: number): Item[][];
|
|
783
|
-
//#endregion
|
|
784
|
-
//#region src/internal/array/compact.d.ts
|
|
785
772
|
/**
|
|
786
773
|
* Compact an array _(removing all false-y values)_
|
|
787
774
|
*
|
|
@@ -807,8 +794,6 @@ export declare function compact<Item>(array: Item[], strict: true): Array<Exclud
|
|
|
807
794
|
* ```
|
|
808
795
|
*/
|
|
809
796
|
export declare function compact<Item>(array: Item[]): Array<Exclude<Item, null | undefined>>;
|
|
810
|
-
//#endregion
|
|
811
|
-
//#region src/internal/array/get.d.ts
|
|
812
797
|
/**
|
|
813
798
|
* Get an array from an object, where only values with numerical keys will be included
|
|
814
799
|
*
|
|
@@ -885,15 +870,11 @@ export declare function getArray<Item>(value: Item[]): Item[];
|
|
|
885
870
|
* ```
|
|
886
871
|
*/
|
|
887
872
|
export declare function getArray<Value>(value: Value): Value[];
|
|
888
|
-
//#endregion
|
|
889
|
-
//#region src/models/array/array.misc.model.d.ts
|
|
890
873
|
/**
|
|
891
874
|
* Comparison of an array within another array
|
|
892
875
|
*/
|
|
893
876
|
type ArrayComparison = "end" | "inside" | "invalid" | "outside" | "same" | "start";
|
|
894
877
|
type ArrayFlattened<Value> = Value extends ReadonlyArray<infer Inner> ? Inner : Value;
|
|
895
|
-
//#endregion
|
|
896
|
-
//#region src/internal/array/match.d.ts
|
|
897
878
|
/**
|
|
898
879
|
* Is the needle array at the end of the haystack array?
|
|
899
880
|
*
|
|
@@ -1139,8 +1120,6 @@ export declare function startsWithArray<Item extends PlainObject>(haystack: Item
|
|
|
1139
1120
|
* ```
|
|
1140
1121
|
*/
|
|
1141
1122
|
export declare function startsWithArray<Item>(haystack: Item[], needle: Item[]): boolean;
|
|
1142
|
-
//#endregion
|
|
1143
|
-
//#region src/internal/array/shuffle.d.ts
|
|
1144
1123
|
/**
|
|
1145
1124
|
* Shuffle items in array
|
|
1146
1125
|
*
|
|
@@ -1153,8 +1132,6 @@ export declare function startsWithArray<Item>(haystack: Item[], needle: Item[]):
|
|
|
1153
1132
|
* ```
|
|
1154
1133
|
*/
|
|
1155
1134
|
export declare function shuffle<Item>(array: Item[]): Item[];
|
|
1156
|
-
//#endregion
|
|
1157
|
-
//#region src/array/difference.d.ts
|
|
1158
1135
|
/**
|
|
1159
1136
|
* Get the items from the first array that are not in the second array
|
|
1160
1137
|
*
|
|
@@ -1207,8 +1184,6 @@ export declare function difference<First extends PlainObject, Second extends Pla
|
|
|
1207
1184
|
* ```
|
|
1208
1185
|
*/
|
|
1209
1186
|
export declare function difference<First, Second>(first: First[], second: Second[]): First[];
|
|
1210
|
-
//#endregion
|
|
1211
|
-
//#region src/array/exists.d.ts
|
|
1212
1187
|
/**
|
|
1213
1188
|
* Does an item with a specific value exist in the array?
|
|
1214
1189
|
*
|
|
@@ -1274,8 +1249,6 @@ export declare function exists<Item>(array: Item[], filter: (item: Item, index:
|
|
|
1274
1249
|
* ```
|
|
1275
1250
|
*/
|
|
1276
1251
|
export declare function exists<Item>(array: Item[], item: Item): boolean;
|
|
1277
|
-
//#endregion
|
|
1278
|
-
//#region src/array/flatten.d.ts
|
|
1279
1252
|
/**
|
|
1280
1253
|
* Flatten an array _(using native `flat` and maximum depth)_
|
|
1281
1254
|
*
|
|
@@ -1288,8 +1261,6 @@ export declare function exists<Item>(array: Item[], item: Item): boolean;
|
|
|
1288
1261
|
* ```
|
|
1289
1262
|
*/
|
|
1290
1263
|
export declare function flatten<Item>(array: Item[]): Array<NestedArray<Item>>;
|
|
1291
|
-
//#endregion
|
|
1292
|
-
//#region src/array/from.d.ts
|
|
1293
1264
|
/**
|
|
1294
1265
|
* Get an array with a specified length, filled with indices
|
|
1295
1266
|
*
|
|
@@ -1367,8 +1338,6 @@ export declare function times<Callback extends (index: number) => unknown>(lengt
|
|
|
1367
1338
|
* ```
|
|
1368
1339
|
*/
|
|
1369
1340
|
export declare function times<Value>(length: number, value: Value): Value[];
|
|
1370
|
-
//#endregion
|
|
1371
|
-
//#region src/array/insert.d.ts
|
|
1372
1341
|
/**
|
|
1373
1342
|
* Insert items into an array at a specified index
|
|
1374
1343
|
*
|
|
@@ -1400,8 +1369,6 @@ export declare function insert<Item>(array: Item[], index: number, items: Item[]
|
|
|
1400
1369
|
* ```
|
|
1401
1370
|
*/
|
|
1402
1371
|
export declare function insert<Item>(array: Item[], items: Item[]): Item[];
|
|
1403
|
-
//#endregion
|
|
1404
|
-
//#region src/array/intersection.d.ts
|
|
1405
1372
|
/**
|
|
1406
1373
|
* Get the common values between two arrays
|
|
1407
1374
|
*
|
|
@@ -1454,8 +1421,6 @@ export declare function intersection<First extends Record<string, unknown>, Seco
|
|
|
1454
1421
|
* ```
|
|
1455
1422
|
*/
|
|
1456
1423
|
export declare function intersection<First, Second>(first: First[], second: Second[]): First[];
|
|
1457
|
-
//#endregion
|
|
1458
|
-
//#region src/array/partition.d.ts
|
|
1459
1424
|
/**
|
|
1460
1425
|
* Get a partitioned array of items
|
|
1461
1426
|
*
|
|
@@ -1537,8 +1502,6 @@ export declare function partition<Item>(array: Item[], filter: (item: Item, inde
|
|
|
1537
1502
|
* ```
|
|
1538
1503
|
*/
|
|
1539
1504
|
export declare function partition<Item>(array: Item[], item: Item): [Item[], Item[]];
|
|
1540
|
-
//#endregion
|
|
1541
|
-
//#region src/array/push.d.ts
|
|
1542
1505
|
/**
|
|
1543
1506
|
* Push items into an array _(at the end)_
|
|
1544
1507
|
*
|
|
@@ -1554,8 +1517,6 @@ export declare function partition<Item>(array: Item[], item: Item): [Item[], Ite
|
|
|
1554
1517
|
* ```
|
|
1555
1518
|
*/
|
|
1556
1519
|
export declare function push<Item>(array: Item[], pushed: Item[]): number;
|
|
1557
|
-
//#endregion
|
|
1558
|
-
//#region src/array/reverse.d.ts
|
|
1559
1520
|
/**
|
|
1560
1521
|
* Reverse the order of items in an array
|
|
1561
1522
|
*
|
|
@@ -1569,8 +1530,6 @@ export declare function push<Item>(array: Item[], pushed: Item[]): number;
|
|
|
1569
1530
|
* ```
|
|
1570
1531
|
*/
|
|
1571
1532
|
export declare function reverse<Item>(array: Item[]): Item[];
|
|
1572
|
-
//#endregion
|
|
1573
|
-
//#region src/array/single.d.ts
|
|
1574
1533
|
/**
|
|
1575
1534
|
* Get the _only_ item matching the given value
|
|
1576
1535
|
*
|
|
@@ -1651,8 +1610,6 @@ export declare function single<Item, Narrowed extends Item>(array: Item[], filte
|
|
|
1651
1610
|
* ```
|
|
1652
1611
|
*/
|
|
1653
1612
|
export declare function single<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item | undefined;
|
|
1654
|
-
//#endregion
|
|
1655
|
-
//#region src/array/slice.d.ts
|
|
1656
1613
|
/**
|
|
1657
1614
|
* Drop items from the start of an array until they match a value
|
|
1658
1615
|
*
|
|
@@ -1824,8 +1781,6 @@ export declare function take<Item extends PlainObject>(array: Item[], callback:
|
|
|
1824
1781
|
* ```
|
|
1825
1782
|
*/
|
|
1826
1783
|
export declare function take(array: unknown[], count: number): unknown[];
|
|
1827
|
-
//#endregion
|
|
1828
|
-
//#region src/array/splice.d.ts
|
|
1829
1784
|
/**
|
|
1830
1785
|
* Adds items into an array at a specific index and removes a specific amount of items
|
|
1831
1786
|
*
|
|
@@ -1906,8 +1861,6 @@ export declare function splice<Item>(array: Item[], start: number, amount: numbe
|
|
|
1906
1861
|
* ```
|
|
1907
1862
|
*/
|
|
1908
1863
|
export declare function splice<Item>(array: Item[], start: number): Item[];
|
|
1909
|
-
//#endregion
|
|
1910
|
-
//#region src/array/to-set.d.ts
|
|
1911
1864
|
/**
|
|
1912
1865
|
* Create a _Set_ from an array of items using a callback
|
|
1913
1866
|
*
|
|
@@ -1952,8 +1905,6 @@ export declare function toSet<Item extends PlainObject, ItemKey extends keyof It
|
|
|
1952
1905
|
* ```
|
|
1953
1906
|
*/
|
|
1954
1907
|
export declare function toSet<Item>(array: Item[]): Set<Item>;
|
|
1955
|
-
//#endregion
|
|
1956
|
-
//#region src/array/toggle.d.ts
|
|
1957
1908
|
/**
|
|
1958
1909
|
* Toggle an item in an array
|
|
1959
1910
|
*
|
|
@@ -2012,8 +1963,6 @@ export declare function toggle<Item extends PlainObject, ItemKey extends keyof I
|
|
|
2012
1963
|
* ```
|
|
2013
1964
|
*/
|
|
2014
1965
|
export declare function toggle<Item>(destination: Item[], toggled: Item[]): Item[];
|
|
2015
|
-
//#endregion
|
|
2016
|
-
//#region src/array/union.d.ts
|
|
2017
1966
|
/**
|
|
2018
1967
|
* Get the combined, unique values from two arrays
|
|
2019
1968
|
*
|
|
@@ -2066,8 +2015,6 @@ export declare function union<First extends Record<string, unknown>, Second exte
|
|
|
2066
2015
|
* ```
|
|
2067
2016
|
*/
|
|
2068
2017
|
export declare function union<First, Second>(first: First[], second: Second[]): (First | Second)[];
|
|
2069
|
-
//#endregion
|
|
2070
|
-
//#region src/array/unique.d.ts
|
|
2071
2018
|
/**
|
|
2072
2019
|
* Get an array of unique items
|
|
2073
2020
|
*
|
|
@@ -2112,8 +2059,6 @@ export declare function unique<Item extends PlainObject, ItemKey extends keyof I
|
|
|
2112
2059
|
* ```
|
|
2113
2060
|
*/
|
|
2114
2061
|
export declare function unique<Item>(array: Item[]): Item[];
|
|
2115
|
-
//#endregion
|
|
2116
|
-
//#region src/array/update.d.ts
|
|
2117
2062
|
/**
|
|
2118
2063
|
* Update an item in an array
|
|
2119
2064
|
*
|
|
@@ -2172,8 +2117,6 @@ export declare function update<Item extends PlainObject, ItemKey extends keyof I
|
|
|
2172
2117
|
* ```
|
|
2173
2118
|
*/
|
|
2174
2119
|
export declare function update<Item>(destination: Item[], updated: Item[]): Item[];
|
|
2175
|
-
//#endregion
|
|
2176
|
-
//#region src/array/last.d.ts
|
|
2177
2120
|
/**
|
|
2178
2121
|
* Get the last item matching the given value
|
|
2179
2122
|
*
|
|
@@ -2356,8 +2299,6 @@ export declare function lastOrDefault<Item>(array: Item[], defaultValue: Item):
|
|
|
2356
2299
|
export declare namespace last {
|
|
2357
2300
|
export var defaulted: typeof lastOrDefault;
|
|
2358
2301
|
}
|
|
2359
|
-
//#endregion
|
|
2360
|
-
//#region src/array/move.d.ts
|
|
2361
2302
|
/**
|
|
2362
2303
|
* Move an item _(or array of items)_ to the position of another item _(or array of items)_ within an array
|
|
2363
2304
|
*
|
|
@@ -2520,8 +2461,6 @@ export declare namespace move {
|
|
|
2520
2461
|
export var indices: typeof moveIndices;
|
|
2521
2462
|
export var toIndex: typeof moveToIndex;
|
|
2522
2463
|
}
|
|
2523
|
-
//#endregion
|
|
2524
|
-
//#region src/array/select.d.ts
|
|
2525
2464
|
/**
|
|
2526
2465
|
* Get a narrowed, mapped, and flattened array of items
|
|
2527
2466
|
*
|
|
@@ -2689,8 +2628,6 @@ export declare namespace filterAndMap {
|
|
|
2689
2628
|
export declare namespace mapAndFilter {
|
|
2690
2629
|
export var flat: typeof flatMapAndFilter;
|
|
2691
2630
|
}
|
|
2692
|
-
//#endregion
|
|
2693
|
-
//#region src/models/array/array.sort.model.d.ts
|
|
2694
2631
|
/**
|
|
2695
2632
|
* Sorting information for arrays _(using a comparison callback)_
|
|
2696
2633
|
*/
|
|
@@ -2803,8 +2740,6 @@ type Sorter<Item> = {
|
|
|
2803
2740
|
};
|
|
2804
2741
|
export declare const SORT_DIRECTION_ASCENDING: SortDirection;
|
|
2805
2742
|
export declare const SORT_DIRECTION_DESCENDING: SortDirection;
|
|
2806
|
-
//#endregion
|
|
2807
|
-
//#region src/array/sort.d.ts
|
|
2808
2743
|
declare function Sorter(this: any, sorters: SortHandler[]): void;
|
|
2809
2744
|
/**
|
|
2810
2745
|
* Get the index for an item _(to be inserted into an array of items)_ based on sorters _(and an optional default direction)_
|
|
@@ -3010,8 +2945,6 @@ export declare namespace sort {
|
|
|
3010
2945
|
export var initialize: typeof initializeSorter;
|
|
3011
2946
|
export var is: typeof isSorted;
|
|
3012
2947
|
}
|
|
3013
|
-
//#endregion
|
|
3014
|
-
//#region src/array/swap.d.ts
|
|
3015
2948
|
/**
|
|
3016
2949
|
* Swap two smaller arrays within a larger array
|
|
3017
2950
|
*
|
|
@@ -3194,8 +3127,6 @@ declare function swapIndices<Item>(array: Item[], first: number, second: number)
|
|
|
3194
3127
|
export declare namespace swap {
|
|
3195
3128
|
export var indices: typeof swapIndices;
|
|
3196
3129
|
}
|
|
3197
|
-
//#endregion
|
|
3198
|
-
//#region src/array/to-map.d.ts
|
|
3199
3130
|
/**
|
|
3200
3131
|
* Create a _Map_ from an array of items using a specific key
|
|
3201
3132
|
*
|
|
@@ -3289,8 +3220,6 @@ export declare function toMapArrays<Item, KeyArg extends KeyOrCallback<Item, Key
|
|
|
3289
3220
|
export declare namespace toMap {
|
|
3290
3221
|
export var arrays: typeof toMapArrays;
|
|
3291
3222
|
}
|
|
3292
|
-
//#endregion
|
|
3293
|
-
//#region src/array/to-record.d.ts
|
|
3294
3223
|
/**
|
|
3295
3224
|
* Create a record from an array of items using a specific key
|
|
3296
3225
|
*
|
|
@@ -3384,14 +3313,11 @@ export declare function toRecordArrays<Item, KeyArg extends KeyOrCallback<Item,
|
|
|
3384
3313
|
export declare namespace toRecord {
|
|
3385
3314
|
export var arrays: typeof toRecordArrays;
|
|
3386
3315
|
}
|
|
3387
|
-
//#endregion
|
|
3388
|
-
//#region src/internal/function/misc.d.ts
|
|
3389
3316
|
/**
|
|
3390
3317
|
* A function that does nothing, which can be useful, I guess…
|
|
3391
3318
|
*/
|
|
3392
3319
|
export declare function noop(): void;
|
|
3393
|
-
|
|
3394
|
-
//#region src/models/function/limiter.model.d.ts
|
|
3320
|
+
export declare function unwrapWork(value: unknown): unknown;
|
|
3395
3321
|
/**
|
|
3396
3322
|
* An asynchronous function that can be cancelled
|
|
3397
3323
|
*/
|
|
@@ -3424,8 +3350,6 @@ type Limiter<Callback extends GenericCallback> = {
|
|
|
3424
3350
|
*/
|
|
3425
3351
|
run(...parameters: Parameters<Callback>): ReturnType<Callback>;
|
|
3426
3352
|
};
|
|
3427
|
-
//#endregion
|
|
3428
|
-
//#region src/function/limit.d.ts
|
|
3429
3353
|
/**
|
|
3430
3354
|
* Debounce a function, ensuring it is only called after `time` milliseconds have passed
|
|
3431
3355
|
*
|
|
@@ -3476,8 +3400,6 @@ export declare namespace debounce {
|
|
|
3476
3400
|
export declare namespace throttle {
|
|
3477
3401
|
export var async: typeof asyncThrottle;
|
|
3478
3402
|
}
|
|
3479
|
-
//#endregion
|
|
3480
|
-
//#region src/models/function/once.model.d.ts
|
|
3481
3403
|
/**
|
|
3482
3404
|
* An asynchronous function that can only be called once, returning the same value on subsequent calls
|
|
3483
3405
|
*/
|
|
@@ -3524,8 +3446,6 @@ type OnceProperties = {
|
|
|
3524
3446
|
*/
|
|
3525
3447
|
clear(): void;
|
|
3526
3448
|
};
|
|
3527
|
-
//#endregion
|
|
3528
|
-
//#region src/function/once.d.ts
|
|
3529
3449
|
declare function AsyncOnce(this: any, callback: GenericAsyncCallback): void;
|
|
3530
3450
|
declare function Once(this: any, callback: GenericCallback): void;
|
|
3531
3451
|
/**
|
|
@@ -3566,8 +3486,6 @@ export declare namespace once {
|
|
|
3566
3486
|
export var is: typeof isOnce;
|
|
3567
3487
|
export var isAsync: typeof isAsyncOnce;
|
|
3568
3488
|
}
|
|
3569
|
-
//#endregion
|
|
3570
|
-
//#region src/models/function/retry.model.d.ts
|
|
3571
3489
|
/**
|
|
3572
3490
|
* An error thrown when a retry fails
|
|
3573
3491
|
*/
|
|
@@ -3580,8 +3498,6 @@ type RetryOptions = {
|
|
|
3580
3498
|
times?: number;
|
|
3581
3499
|
when?: (error: unknown) => boolean;
|
|
3582
3500
|
};
|
|
3583
|
-
//#endregion
|
|
3584
|
-
//#region src/function/retry.d.ts
|
|
3585
3501
|
/**
|
|
3586
3502
|
* Retry a callback a specified number of times, with a delay between attempts
|
|
3587
3503
|
*
|
|
@@ -3613,8 +3529,6 @@ export declare function retry<Callback extends GenericCallback>(callback: Callba
|
|
|
3613
3529
|
export declare namespace retry {
|
|
3614
3530
|
export var async: typeof asyncRetry;
|
|
3615
3531
|
}
|
|
3616
|
-
//#endregion
|
|
3617
|
-
//#region src/internal/array/index-of.d.ts
|
|
3618
3532
|
/**
|
|
3619
3533
|
* Get the index of the first matching item by callback
|
|
3620
3534
|
*
|
|
@@ -3756,15 +3670,11 @@ export declare function lastIndexOf<Item>(array: Item[], item: Item): number;
|
|
|
3756
3670
|
export declare namespace indexOf {
|
|
3757
3671
|
export var last: typeof lastIndexOf;
|
|
3758
3672
|
}
|
|
3759
|
-
//#endregion
|
|
3760
|
-
//#region src/models/function/assert.model.d.ts
|
|
3761
3673
|
type AssertNestedPick<Value, Path extends string> = Value extends PlainObject ? Path extends `${infer Head}.${infer Rest}` ? Head extends keyof Value ? { [Key in Head]: AssertNestedPick<Value[Key], Rest>; } : never : Path extends keyof Value ? { [Key in Path]: Value[Key]; } : never : never;
|
|
3762
3674
|
/**
|
|
3763
3675
|
* A function that asserts a value is of a specific type, throwing an error if it is not
|
|
3764
3676
|
*/
|
|
3765
3677
|
type Asserter<Value> = (value: unknown) => asserts value is Value;
|
|
3766
|
-
//#endregion
|
|
3767
|
-
//#region src/internal/function/assert.d.ts
|
|
3768
3678
|
/**
|
|
3769
3679
|
* Asserts that a condition is true, throwing an error if it is not
|
|
3770
3680
|
*
|
|
@@ -3835,8 +3745,6 @@ export declare namespace assert {
|
|
|
3835
3745
|
export var is: typeof assertIs;
|
|
3836
3746
|
export var property: typeof assertProperty;
|
|
3837
3747
|
}
|
|
3838
|
-
//#endregion
|
|
3839
|
-
//#region src/internal/sized/map.d.ts
|
|
3840
3748
|
/**
|
|
3841
3749
|
* A _Map_ with a maximum size
|
|
3842
3750
|
*
|
|
@@ -3848,6 +3756,9 @@ export declare class SizedMap<SizedKey = unknown, SizedValue = unknown> extends
|
|
|
3848
3756
|
* Is the _Map_ full?
|
|
3849
3757
|
*/
|
|
3850
3758
|
get full(): boolean;
|
|
3759
|
+
/**
|
|
3760
|
+
* The maximum size of the _Map_
|
|
3761
|
+
*/
|
|
3851
3762
|
get maximum(): number;
|
|
3852
3763
|
/**
|
|
3853
3764
|
* Create a new _SizedMap_ with entries and a maximum size _(2^20)_
|
|
@@ -3883,8 +3794,6 @@ export declare class SizedMap<SizedKey = unknown, SizedValue = unknown> extends
|
|
|
3883
3794
|
*/
|
|
3884
3795
|
override set(key: SizedKey, value: SizedValue): this;
|
|
3885
3796
|
}
|
|
3886
|
-
//#endregion
|
|
3887
|
-
//#region src/models/function/memoize.model.d.ts
|
|
3888
3797
|
/**
|
|
3889
3798
|
* A _Memoized_ function instance, caching and retrieving results based on the its parameters _(or a custom cache key)_
|
|
3890
3799
|
*/
|
|
@@ -3957,8 +3866,6 @@ type MemoizedStateOptions = {
|
|
|
3957
3866
|
cacheKey?: GenericCallback;
|
|
3958
3867
|
cacheSize: number;
|
|
3959
3868
|
};
|
|
3960
|
-
//#endregion
|
|
3961
|
-
//#region src/internal/function/memoize.d.ts
|
|
3962
3869
|
declare function Memoized(this: any, callback: GenericCallback, options: MemoizedStateOptions): void;
|
|
3963
3870
|
/**
|
|
3964
3871
|
* Memoize a function, caching and retrieving results based on the first parameter
|
|
@@ -3968,8 +3875,6 @@ declare function Memoized(this: any, callback: GenericCallback, options: Memoize
|
|
|
3968
3875
|
* @returns _Memoized_ instance
|
|
3969
3876
|
*/
|
|
3970
3877
|
export declare function memoize<Callback extends GenericCallback>(callback: Callback, options?: MemoizedOptions<Callback>): Memoized<Callback>;
|
|
3971
|
-
//#endregion
|
|
3972
|
-
//#region src/models/result.model.d.ts
|
|
3973
3878
|
/**
|
|
3974
3879
|
* An unknown result
|
|
3975
3880
|
*/
|
|
@@ -4038,8 +3943,6 @@ type UnwrapResult<Original extends Result<unknown, unknown>> = Original extends
|
|
|
4038
3943
|
* Unwrap any value
|
|
4039
3944
|
*/
|
|
4040
3945
|
export type UnwrapValue<Original> = Original extends GenericCallback ? ReturnType<Original> extends Result<unknown, unknown> ? UnwrapResult<ReturnType<Original>> : ReturnType<Original> : Original extends Result<unknown, unknown> ? UnwrapResult<Original> : Original extends Promise<infer Value> ? Awaited<Value> : Original;
|
|
4041
|
-
//#endregion
|
|
4042
|
-
//#region src/models/function/work.model.d.ts
|
|
4043
3946
|
/**
|
|
4044
3947
|
* An asynchronous _Flow_, a function that pipes a value through a series of functions
|
|
4045
3948
|
*/
|
|
@@ -4048,8 +3951,6 @@ type AsyncFlow<Callback extends GenericCallback, Value> = (...args: Parameters<C
|
|
|
4048
3951
|
* A synchronous _Flow_, a function that pipe a value through a series of functions
|
|
4049
3952
|
*/
|
|
4050
3953
|
type Flow<Callback extends GenericCallback, Value> = (...args: Parameters<Callback>) => UnwrapValue<Value>;
|
|
4051
|
-
//#endregion
|
|
4052
|
-
//#region src/internal/function/work.d.ts
|
|
4053
3954
|
/**
|
|
4054
3955
|
* Create an asynchronous _Flow_, a function that pipes values through a function
|
|
4055
3956
|
*
|
|
@@ -4416,16 +4317,12 @@ export declare namespace flow {
|
|
|
4416
4317
|
export declare namespace pipe {
|
|
4417
4318
|
export var async: typeof asyncPipe;
|
|
4418
4319
|
}
|
|
4419
|
-
//#endregion
|
|
4420
|
-
//#region src/models/string/string.case.model.d.ts
|
|
4421
4320
|
type StringCase = "camel" | "capitalize" | "kebab" | "lower" | "pascal" | "snake" | "title" | "upper";
|
|
4422
4321
|
type StringCaseOptions = {
|
|
4423
4322
|
capitalizeAny: boolean;
|
|
4424
4323
|
capitalizeFirst: boolean;
|
|
4425
4324
|
type: StringCase;
|
|
4426
4325
|
};
|
|
4427
|
-
//#endregion
|
|
4428
|
-
//#region src/internal/string/case.d.ts
|
|
4429
4326
|
/**
|
|
4430
4327
|
* Convert a string to camel case _(thisIsCamelCase)_
|
|
4431
4328
|
*
|
|
@@ -4546,8 +4443,6 @@ export declare function toCaseCallback(this: StringCaseOptions, value: string):
|
|
|
4546
4443
|
* ```
|
|
4547
4444
|
*/
|
|
4548
4445
|
export declare function upperCase(value: string): string;
|
|
4549
|
-
//#endregion
|
|
4550
|
-
//#region src/internal/string/misc.d.ts
|
|
4551
4446
|
/**
|
|
4552
4447
|
* Get the string value from any value
|
|
4553
4448
|
*
|
|
@@ -4607,8 +4502,6 @@ export declare function tryEncode(value: boolean | number | string): unknown;
|
|
|
4607
4502
|
* @returns Array of words found in the string
|
|
4608
4503
|
*/
|
|
4609
4504
|
export declare function words(value: string): string[];
|
|
4610
|
-
//#endregion
|
|
4611
|
-
//#region src/models/value/value.handler.model.d.ts
|
|
4612
4505
|
type BaseHandler = {
|
|
4613
4506
|
handlers: WeakMap<WeakKey, string | GenericCallback>;
|
|
4614
4507
|
options: BaseHandlerOptions;
|
|
@@ -4629,8 +4522,6 @@ type ValueHandler = {
|
|
|
4629
4522
|
base: BaseHandler;
|
|
4630
4523
|
handle(value: unknown, ...parameters: unknown[]): unknown;
|
|
4631
4524
|
};
|
|
4632
|
-
//#endregion
|
|
4633
|
-
//#region src/models/value/value.misc.model.d.ts
|
|
4634
4525
|
type ComparisonHandler<Value = any> = (first: Value, second: Value) => number;
|
|
4635
4526
|
/**
|
|
4636
4527
|
* Thanks, type-fest!
|
|
@@ -4648,8 +4539,6 @@ type Smushed<Value extends PlainObject> = Simplify<{ [NestedKey in NestedKeys<Va
|
|
|
4648
4539
|
* An unsmushed object, with all dot notation keys turned into nested keys
|
|
4649
4540
|
*/
|
|
4650
4541
|
type Unsmushed<Value extends PlainObject> = Simplify<Omit<{ [UnionKey in KeysOfUnion<Value>]: Value[UnionKey]; }, `${string}.${string}`>>;
|
|
4651
|
-
//#endregion
|
|
4652
|
-
//#region src/internal/value/compare.d.ts
|
|
4653
4542
|
/**
|
|
4654
4543
|
* Compare two values _(for sorting purposes)_
|
|
4655
4544
|
*
|
|
@@ -4680,8 +4569,6 @@ export declare namespace compare {
|
|
|
4680
4569
|
export var handler: CompareHandler<number>;
|
|
4681
4570
|
export var register: typeof registerComparator;
|
|
4682
4571
|
}
|
|
4683
|
-
//#endregion
|
|
4684
|
-
//#region src/models/value/value.equal.model.d.ts
|
|
4685
4572
|
/**
|
|
4686
4573
|
* Options for value equality comparison
|
|
4687
4574
|
*/
|
|
@@ -4746,8 +4633,6 @@ type EqualizerOptionsKeys<Values> = {
|
|
|
4746
4633
|
enabled: boolean;
|
|
4747
4634
|
values: Values;
|
|
4748
4635
|
};
|
|
4749
|
-
//#endregion
|
|
4750
|
-
//#region src/internal/value/equal.d.ts
|
|
4751
4636
|
declare function Equalizer(this: any, options: EqualizerOptions): void;
|
|
4752
4637
|
/**
|
|
4753
4638
|
* Deregister a equality comparison handler for a specific class
|
|
@@ -4799,8 +4684,6 @@ export declare namespace equal {
|
|
|
4799
4684
|
export var initialize: typeof initializeEqualizer;
|
|
4800
4685
|
export var register: typeof registerEqualizer;
|
|
4801
4686
|
}
|
|
4802
|
-
//#endregion
|
|
4803
|
-
//#region src/internal/value/get.d.ts
|
|
4804
4687
|
/**
|
|
4805
4688
|
* Get the value from an object using a known path
|
|
4806
4689
|
*
|
|
@@ -4838,8 +4721,6 @@ export declare function getValue<Data extends PlainObject, Path extends NestedKe
|
|
|
4838
4721
|
* ```
|
|
4839
4722
|
*/
|
|
4840
4723
|
export declare function getValue<Data extends PlainObject>(data: Data, path: string, ignoreCase?: boolean): unknown;
|
|
4841
|
-
//#endregion
|
|
4842
|
-
//#region src/internal/value/has.d.ts
|
|
4843
4724
|
/**
|
|
4844
4725
|
* Check if a property is defined in an object
|
|
4845
4726
|
*
|
|
@@ -4922,8 +4803,6 @@ export declare function hasValueResult<Data extends PlainObject>(data: Data, pat
|
|
|
4922
4803
|
export declare namespace hasValue {
|
|
4923
4804
|
export var get: typeof hasValueResult;
|
|
4924
4805
|
}
|
|
4925
|
-
//#endregion
|
|
4926
|
-
//#region src/internal/value/set.d.ts
|
|
4927
4806
|
/**
|
|
4928
4807
|
* Update the value in an object using a known path
|
|
4929
4808
|
*
|
|
@@ -4973,8 +4852,6 @@ export declare function setValue<Data extends PlainObject, Path extends NestedKe
|
|
|
4973
4852
|
* ```
|
|
4974
4853
|
*/
|
|
4975
4854
|
export declare function setValue<Data extends PlainObject>(data: Data, path: string, value: unknown, ignoreCase?: boolean): Data;
|
|
4976
|
-
//#endregion
|
|
4977
|
-
//#region src/models/plan.model.d.ts
|
|
4978
4855
|
/**
|
|
4979
4856
|
* An immediately failing asynchronous plan
|
|
4980
4857
|
*/
|
|
@@ -5003,19 +4880,19 @@ type AsyncPlan<Yielded, Returned, Parameters extends unknown[]> = {
|
|
|
5003
4880
|
*
|
|
5004
4881
|
* @returns Attempted result
|
|
5005
4882
|
*/
|
|
5006
|
-
attempt: Parameters extends [infer _, ...(infer _)[]] ? (parameters: Parameters, signal?: AbortSignal) => Promise<Result<
|
|
4883
|
+
attempt: Parameters extends [infer _, ...(infer _)[]] ? (parameters: Parameters, signal?: AbortSignal) => Promise<Result<PlannedOk<Returned>, PlannedError<Yielded, Returned>>> : (signal?: AbortSignal) => Promise<Result<PlannedOk<Returned>, PlannedError<Yielded, Returned>>>;
|
|
5007
4884
|
/**
|
|
5008
4885
|
* Run the plan to completion
|
|
5009
4886
|
*
|
|
5010
|
-
* @throws {
|
|
4887
|
+
* @throws {PlannedError<Yielded, Returned>}
|
|
5011
4888
|
* @returns Result
|
|
5012
4889
|
*/
|
|
5013
|
-
run: Parameters extends [infer _, ...(infer _)[]] ? (parameters: Parameters, signal?: AbortSignal) => Promise<
|
|
4890
|
+
run: Parameters extends [infer _, ...(infer _)[]] ? (parameters: Parameters, signal?: AbortSignal) => Promise<PlannedReturned<Returned>> : (signal?: AbortSignal) => Promise<PlannedReturned<Returned>>;
|
|
5014
4891
|
};
|
|
5015
4892
|
/**
|
|
5016
4893
|
* An immediately succeeding or failing asynchronous plan
|
|
5017
4894
|
*/
|
|
5018
|
-
type
|
|
4895
|
+
type AsyncImmediate<Value, Error> = AsyncSuccess<Value> | AsyncFailure<Error>;
|
|
5019
4896
|
/**
|
|
5020
4897
|
* A single asynchronous step within a plan of execution
|
|
5021
4898
|
*/
|
|
@@ -5058,6 +4935,10 @@ type Failure<Value> = {
|
|
|
5058
4935
|
*/
|
|
5059
4936
|
[Symbol.iterator]: () => Generator<Err<Value>, never>;
|
|
5060
4937
|
};
|
|
4938
|
+
/**
|
|
4939
|
+
* An immediately succeeding or failing plan
|
|
4940
|
+
*/
|
|
4941
|
+
type Immediate<Value, Error> = Success<Value> | Failure<Error>;
|
|
5061
4942
|
type InvalidAsyncStepValue<Input> = ((...args: any[]) => unknown) | ParameterizedPlan<Input>;
|
|
5062
4943
|
type InvalidStepValue<Input> = ((...args: any[]) => unknown) | {
|
|
5063
4944
|
[Symbol.asyncIterator]: unknown;
|
|
@@ -5084,33 +4965,29 @@ type Plan<Yielded, Returned, Parameters extends unknown[]> = {
|
|
|
5084
4965
|
*
|
|
5085
4966
|
* @returns Attempted result
|
|
5086
4967
|
*/
|
|
5087
|
-
attempt(...parameters: Parameters): Result<
|
|
4968
|
+
attempt(...parameters: Parameters): Result<PlannedOk<Returned>, PlannedError<Yielded, Returned>>;
|
|
5088
4969
|
/**
|
|
5089
4970
|
* Run the plan to completion
|
|
5090
4971
|
*
|
|
5091
|
-
* @throws {
|
|
4972
|
+
* @throws {PlannedError<Yielded, Returned>}
|
|
5092
4973
|
* @returns Result
|
|
5093
4974
|
*/
|
|
5094
|
-
run(...parameters: Parameters):
|
|
4975
|
+
run(...parameters: Parameters): PlannedReturned<Returned>;
|
|
5095
4976
|
};
|
|
5096
|
-
/**
|
|
5097
|
-
* An OK result of a plan execution
|
|
5098
|
-
*/
|
|
5099
|
-
type PlanOk<Returned> = Returned extends Error ? never : Returned extends Err<infer _> ? never : Returned extends Ok<infer Value> ? Value : Returned;
|
|
5100
|
-
type PlanErrors<Yielded, Returned> = PlanErrorValues<Yielded> | PlanErrorValues<Returned>;
|
|
5101
4977
|
/**
|
|
5102
4978
|
* An error result of a plan execution
|
|
5103
4979
|
*/
|
|
5104
|
-
type
|
|
4980
|
+
type PlannedError<Yielded, Returned> = [PlannedErrors<Yielded, Returned>] extends [never] ? Error : PlanErrorValues<Yielded> | PlanErrorValues<Returned>;
|
|
4981
|
+
type PlannedErrors<Yielded, Returned> = PlanErrorValues<Yielded> | PlanErrorValues<Returned>;
|
|
5105
4982
|
type PlanErrorValues<Original> = Original extends Error ? Original : Original extends Err<infer E> ? E : Original extends Failure<infer E> ? E : never;
|
|
5106
4983
|
/**
|
|
5107
|
-
*
|
|
4984
|
+
* An OK result of a plan execution
|
|
5108
4985
|
*/
|
|
5109
|
-
type
|
|
4986
|
+
type PlannedOk<Returned> = Returned extends Error ? never : Returned extends Err<infer _> ? never : Returned extends Ok<infer Value> ? Value : Returned;
|
|
5110
4987
|
/**
|
|
5111
|
-
*
|
|
4988
|
+
* The returned result of a plan execution _(excluding errors, which are thrown)_
|
|
5112
4989
|
*/
|
|
5113
|
-
type
|
|
4990
|
+
type PlannedReturned<Returned> = Returned extends Error ? never : Returned extends Err<infer _> ? never : Returned;
|
|
5114
4991
|
/**
|
|
5115
4992
|
* A single step within a plan of execution
|
|
5116
4993
|
*/
|
|
@@ -5140,8 +5017,6 @@ type Success<Value> = {
|
|
|
5140
5017
|
*/
|
|
5141
5018
|
[Symbol.iterator]: () => Generator<never, Value>;
|
|
5142
5019
|
};
|
|
5143
|
-
//#endregion
|
|
5144
|
-
//#region src/plan/index.d.ts
|
|
5145
5020
|
/**
|
|
5146
5021
|
* Create a plan for an asynchronous generator function
|
|
5147
5022
|
*
|
|
@@ -5156,8 +5031,6 @@ export declare function plan<Yielded, Returned, Parameters extends unknown[]>(ge
|
|
|
5156
5031
|
* @returns Generator plan
|
|
5157
5032
|
*/
|
|
5158
5033
|
export declare function plan<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => Generator<Yielded, Returned>): Plan<Yielded, Returned, Parameters>;
|
|
5159
|
-
//#endregion
|
|
5160
|
-
//#region src/plan/is.d.ts
|
|
5161
5034
|
/**
|
|
5162
5035
|
* Is the value an asynchronous, immediately failing plan?
|
|
5163
5036
|
*
|
|
@@ -5242,8 +5115,6 @@ export declare function isStep<Value = unknown>(value: unknown): value is Step<V
|
|
|
5242
5115
|
* @returns `true` if the value is an immediately successful plan, otherwise `false`
|
|
5243
5116
|
*/
|
|
5244
5117
|
export declare function isSuccess<Value = unknown>(value: unknown): value is Success<Value>;
|
|
5245
|
-
//#endregion
|
|
5246
|
-
//#region src/plan/misc.d.ts
|
|
5247
5118
|
/**
|
|
5248
5119
|
* Create an immediately failing plan
|
|
5249
5120
|
*
|
|
@@ -5306,8 +5177,6 @@ export declare namespace fail {
|
|
|
5306
5177
|
export declare namespace succeed {
|
|
5307
5178
|
export var async: typeof asyncSucceed;
|
|
5308
5179
|
}
|
|
5309
|
-
//#endregion
|
|
5310
|
-
//#region src/plan/result.d.ts
|
|
5311
5180
|
/**
|
|
5312
5181
|
* Attempt to run the generator to completion
|
|
5313
5182
|
*
|
|
@@ -5318,7 +5187,7 @@ export declare namespace succeed {
|
|
|
5318
5187
|
* @param signal Optional abort signal
|
|
5319
5188
|
* @returns Promised result
|
|
5320
5189
|
*/
|
|
5321
|
-
export declare function asyncAttemptRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => AsyncGenerator<Yielded, Returned>, parameters: Parameters, signal?: AbortSignal): Promise<Result<
|
|
5190
|
+
export declare function asyncAttemptRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => AsyncGenerator<Yielded, Returned>, parameters: Parameters, signal?: AbortSignal): Promise<Result<PlannedOk<Returned>, PlannedError<Yielded, Returned>>>;
|
|
5322
5191
|
/**
|
|
5323
5192
|
* Attempt to run the generator to completion
|
|
5324
5193
|
*
|
|
@@ -5328,7 +5197,7 @@ export declare function asyncAttemptRun<Yielded, Returned, Parameters extends un
|
|
|
5328
5197
|
* @param signal Optional abort signal
|
|
5329
5198
|
* @returns Promised result
|
|
5330
5199
|
*/
|
|
5331
|
-
export declare function asyncAttemptRun<Yielded, Returned>(generator: () => AsyncGenerator<Yielded, Returned>, signal?: AbortSignal): Promise<Result<
|
|
5200
|
+
export declare function asyncAttemptRun<Yielded, Returned>(generator: () => AsyncGenerator<Yielded, Returned>, signal?: AbortSignal): Promise<Result<PlannedOk<Returned>, PlannedError<Yielded, Returned>>>;
|
|
5332
5201
|
/**
|
|
5333
5202
|
* Attempt to run the plan to completion
|
|
5334
5203
|
*
|
|
@@ -5339,7 +5208,7 @@ export declare function asyncAttemptRun<Yielded, Returned>(generator: () => Asyn
|
|
|
5339
5208
|
* @param signal Optional abort signal
|
|
5340
5209
|
* @returns Promised result
|
|
5341
5210
|
*/
|
|
5342
|
-
export declare function asyncAttemptRun<Yielded, Returned, Parameters extends unknown[]>(plan: AsyncPlan<Yielded, Returned, Parameters>, parameters: Parameters, signal?: AbortSignal): Promise<Result<
|
|
5211
|
+
export declare function asyncAttemptRun<Yielded, Returned, Parameters extends unknown[]>(plan: AsyncPlan<Yielded, Returned, Parameters>, parameters: Parameters, signal?: AbortSignal): Promise<Result<PlannedOk<Returned>, PlannedError<Yielded, Returned>>>;
|
|
5343
5212
|
/**
|
|
5344
5213
|
* Attempt to run the plan to completion
|
|
5345
5214
|
*
|
|
@@ -5349,7 +5218,7 @@ export declare function asyncAttemptRun<Yielded, Returned, Parameters extends un
|
|
|
5349
5218
|
* @param signal Optional abort signal
|
|
5350
5219
|
* @returns Promised result
|
|
5351
5220
|
*/
|
|
5352
|
-
export declare function asyncAttemptRun<Yielded, Returned>(plan: AsyncPlan<Yielded, Returned, []>, signal?: AbortSignal): Promise<Result<
|
|
5221
|
+
export declare function asyncAttemptRun<Yielded, Returned>(plan: AsyncPlan<Yielded, Returned, []>, signal?: AbortSignal): Promise<Result<PlannedOk<Returned>, PlannedError<Yielded, Returned>>>;
|
|
5353
5222
|
/**
|
|
5354
5223
|
* Attempt to run the generator to completion
|
|
5355
5224
|
*
|
|
@@ -5359,7 +5228,7 @@ export declare function asyncAttemptRun<Yielded, Returned>(plan: AsyncPlan<Yield
|
|
|
5359
5228
|
* @param parameters Parameters for starting the run
|
|
5360
5229
|
* @returns Result
|
|
5361
5230
|
*/
|
|
5362
|
-
export declare function attemptRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => Generator<Yielded, Returned>, ...parameters: Parameters): Result<
|
|
5231
|
+
export declare function attemptRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => Generator<Yielded, Returned>, ...parameters: Parameters): Result<PlannedOk<Returned>, PlannedError<Yielded, Returned>>;
|
|
5363
5232
|
/**
|
|
5364
5233
|
* Attempt to run the plan to completion
|
|
5365
5234
|
*
|
|
@@ -5369,12 +5238,10 @@ export declare function attemptRun<Yielded, Returned, Parameters extends unknown
|
|
|
5369
5238
|
* @param parameters Parameters for starting the run
|
|
5370
5239
|
* @returns Result
|
|
5371
5240
|
*/
|
|
5372
|
-
export declare function attemptRun<Yielded, Returned, Parameters extends unknown[]>(plan: Plan<Yielded, Returned, Parameters>, ...parameters: Parameters): Result<
|
|
5241
|
+
export declare function attemptRun<Yielded, Returned, Parameters extends unknown[]>(plan: Plan<Yielded, Returned, Parameters>, ...parameters: Parameters): Result<PlannedOk<Returned>, PlannedError<Yielded, Returned>>;
|
|
5373
5242
|
export declare namespace attemptRun {
|
|
5374
5243
|
export var async: typeof asyncAttemptRun;
|
|
5375
5244
|
}
|
|
5376
|
-
//#endregion
|
|
5377
|
-
//#region src/plan/run.d.ts
|
|
5378
5245
|
/**
|
|
5379
5246
|
* Run an asynchronous generator to completion
|
|
5380
5247
|
*
|
|
@@ -5383,7 +5250,7 @@ export declare namespace attemptRun {
|
|
|
5383
5250
|
* @param signal Optional abort signal
|
|
5384
5251
|
* @returns Result
|
|
5385
5252
|
*/
|
|
5386
|
-
export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => AsyncGenerator<Yielded, Returned>, parameters: Parameters, signal?: AbortSignal): Promise<
|
|
5253
|
+
export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => AsyncGenerator<Yielded, Returned>, parameters: Parameters, signal?: AbortSignal): Promise<PlannedReturned<Returned>>;
|
|
5387
5254
|
/**
|
|
5388
5255
|
* Run an asynchronous generator to completion
|
|
5389
5256
|
*
|
|
@@ -5391,7 +5258,7 @@ export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]
|
|
|
5391
5258
|
* @param signal Optional abort signal
|
|
5392
5259
|
* @returns Result
|
|
5393
5260
|
*/
|
|
5394
|
-
export declare function asyncRun<Yielded, Returned>(generator: () => AsyncGenerator<Yielded, Returned>, signal?: AbortSignal): Promise<
|
|
5261
|
+
export declare function asyncRun<Yielded, Returned>(generator: () => AsyncGenerator<Yielded, Returned>, signal?: AbortSignal): Promise<PlannedReturned<Returned>>;
|
|
5395
5262
|
/**
|
|
5396
5263
|
* Run an asynchronous plan to completion
|
|
5397
5264
|
*
|
|
@@ -5400,7 +5267,7 @@ export declare function asyncRun<Yielded, Returned>(generator: () => AsyncGenera
|
|
|
5400
5267
|
* @param signal Optional abort signal
|
|
5401
5268
|
* @returns Result
|
|
5402
5269
|
*/
|
|
5403
|
-
export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]>(plan: AsyncPlan<Yielded, Returned, Parameters>, parameters: Parameters, signal?: AbortSignal): Promise<
|
|
5270
|
+
export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]>(plan: AsyncPlan<Yielded, Returned, Parameters>, parameters: Parameters, signal?: AbortSignal): Promise<PlannedReturned<Returned>>;
|
|
5404
5271
|
/**
|
|
5405
5272
|
* Run an asynchronous plan to completion
|
|
5406
5273
|
*
|
|
@@ -5408,7 +5275,7 @@ export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]
|
|
|
5408
5275
|
* @param signal Optional abort signal
|
|
5409
5276
|
* @returns Result
|
|
5410
5277
|
*/
|
|
5411
|
-
export declare function asyncRun<Yielded, Returned>(plan: AsyncPlan<Yielded, Returned, []>, signal?: AbortSignal): Promise<
|
|
5278
|
+
export declare function asyncRun<Yielded, Returned>(plan: AsyncPlan<Yielded, Returned, []>, signal?: AbortSignal): Promise<PlannedReturned<Returned>>;
|
|
5412
5279
|
/**
|
|
5413
5280
|
* Run a generator to completion
|
|
5414
5281
|
*
|
|
@@ -5416,7 +5283,7 @@ export declare function asyncRun<Yielded, Returned>(plan: AsyncPlan<Yielded, Ret
|
|
|
5416
5283
|
* @param parameters Parameters for starting the run
|
|
5417
5284
|
* @returns Result
|
|
5418
5285
|
*/
|
|
5419
|
-
export declare function run<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => Generator<Yielded, Returned>, ...parameters: Parameters):
|
|
5286
|
+
export declare function run<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => Generator<Yielded, Returned>, ...parameters: Parameters): PlannedReturned<Returned>;
|
|
5420
5287
|
/**
|
|
5421
5288
|
* Run a plan to completion
|
|
5422
5289
|
*
|
|
@@ -5424,7 +5291,7 @@ export declare function run<Yielded, Returned, Parameters extends unknown[]>(gen
|
|
|
5424
5291
|
* @param parameters Parameters for starting the run
|
|
5425
5292
|
* @returns Result
|
|
5426
5293
|
*/
|
|
5427
|
-
export declare function run<Yielded, Returned, Parameters extends unknown[]>(plan: Plan<Yielded, Returned, Parameters>, ...parameters: Parameters):
|
|
5294
|
+
export declare function run<Yielded, Returned, Parameters extends unknown[]>(plan: Plan<Yielded, Returned, Parameters>, ...parameters: Parameters): PlannedReturned<Returned>;
|
|
5428
5295
|
export declare namespace asyncRun {
|
|
5429
5296
|
export var attempt: typeof asyncAttemptRun;
|
|
5430
5297
|
}
|
|
@@ -5432,8 +5299,6 @@ export declare namespace run {
|
|
|
5432
5299
|
export var async: typeof asyncRun;
|
|
5433
5300
|
export var attempt: typeof attemptRun;
|
|
5434
5301
|
}
|
|
5435
|
-
//#endregion
|
|
5436
|
-
//#region src/plan/use.d.ts
|
|
5437
5302
|
/**
|
|
5438
5303
|
* Create an asynchronous step from a callback
|
|
5439
5304
|
*
|
|
@@ -5467,15 +5332,11 @@ export declare function use<Value>(value: Value & StepValue<Value>): Step<Value>
|
|
|
5467
5332
|
export declare namespace use {
|
|
5468
5333
|
export var async: typeof asyncUse;
|
|
5469
5334
|
}
|
|
5470
|
-
//#endregion
|
|
5471
|
-
//#region src/models/aborter.model.d.ts
|
|
5472
5335
|
type Aborter = {
|
|
5473
5336
|
callback: GenericCallback;
|
|
5474
5337
|
cancel(): void;
|
|
5475
5338
|
signal: AbortSignal;
|
|
5476
5339
|
};
|
|
5477
|
-
//#endregion
|
|
5478
|
-
//#region src/models/promise.model.d.ts
|
|
5479
5340
|
/**
|
|
5480
5341
|
* A _Promise_ that can be canceled
|
|
5481
5342
|
*/
|
|
@@ -5539,12 +5400,6 @@ type PromiseParameters = {
|
|
|
5539
5400
|
* - `first`: rejects on the first rejected _Promise_, and returns an array of values
|
|
5540
5401
|
*/
|
|
5541
5402
|
type PromiseStrategy = "complete" | "first";
|
|
5542
|
-
/**
|
|
5543
|
-
* An error thrown when a promise times out
|
|
5544
|
-
*/
|
|
5545
|
-
export declare class PromiseTimeoutError extends Error {
|
|
5546
|
-
constructor();
|
|
5547
|
-
}
|
|
5548
5403
|
type PromisesItems<Items extends ArrayOrPlainObject> = { [ItemsKey in keyof Items]: Items[ItemsKey] extends GenericCallback ? ReturnType<Items[ItemsKey]> extends Promise<infer Value> ? Promise<Value> : never : Items[ItemsKey] extends Promise<infer Value> ? Promise<Value> : Promise<Items[ItemsKey]>; };
|
|
5549
5404
|
/**
|
|
5550
5405
|
* Options for handling multiple _Promises_
|
|
@@ -5576,10 +5431,14 @@ type RejectedPromise = {
|
|
|
5576
5431
|
*/
|
|
5577
5432
|
reason: unknown;
|
|
5578
5433
|
};
|
|
5434
|
+
/**
|
|
5435
|
+
* An error thrown when a promise times out
|
|
5436
|
+
*/
|
|
5437
|
+
export declare class TimedError extends Error {
|
|
5438
|
+
constructor();
|
|
5439
|
+
}
|
|
5579
5440
|
declare const PROMISE_TYPE_FULFILLED = "fulfilled";
|
|
5580
5441
|
declare const PROMISE_TYPE_REJECTED = "rejected";
|
|
5581
|
-
//#endregion
|
|
5582
|
-
//#region src/promise/delay.d.ts
|
|
5583
5442
|
/**
|
|
5584
5443
|
* Create a delayed promise that resolves after a certain amount of time, or rejects if aborted
|
|
5585
5444
|
*
|
|
@@ -5594,8 +5453,6 @@ export declare function delay(options?: PromiseOptions): Promise<void>;
|
|
|
5594
5453
|
* @returns Delayed promise
|
|
5595
5454
|
*/
|
|
5596
5455
|
export declare function delay(time?: number): Promise<void>;
|
|
5597
|
-
//#endregion
|
|
5598
|
-
//#region src/promise/index.d.ts
|
|
5599
5456
|
type AttemptPromiseOptions = PromiseOptions | AbortSignal | number;
|
|
5600
5457
|
/**
|
|
5601
5458
|
* Wrap a _Promise_ with safety handlers
|
|
@@ -5702,8 +5559,6 @@ export declare function resultPromises<Items extends PlainObject>(items: Items,
|
|
|
5702
5559
|
export declare namespace promises {
|
|
5703
5560
|
export var result: typeof resultPromises;
|
|
5704
5561
|
}
|
|
5705
|
-
//#endregion
|
|
5706
|
-
//#region src/internal/result/misc.d.ts
|
|
5707
5562
|
/**
|
|
5708
5563
|
* Creates an extended error result
|
|
5709
5564
|
*
|
|
@@ -5800,8 +5655,6 @@ export declare namespace error {
|
|
|
5800
5655
|
export declare namespace ok {
|
|
5801
5656
|
export var is: typeof isOk;
|
|
5802
5657
|
}
|
|
5803
|
-
//#endregion
|
|
5804
|
-
//#region src/result/misc.d.ts
|
|
5805
5658
|
/**
|
|
5806
5659
|
* Converts a result to a _Promise_
|
|
5807
5660
|
*
|
|
@@ -5820,8 +5673,6 @@ export declare function toPromise<Value, E = Error>(callback: () => AnyResult<Va
|
|
|
5820
5673
|
* @returns Promised result
|
|
5821
5674
|
*/
|
|
5822
5675
|
export declare function toPromise<Value, E = Error>(result: AnyResult<Value, E>): Promise<Value>;
|
|
5823
|
-
//#endregion
|
|
5824
|
-
//#region src/promise/helpers.d.ts
|
|
5825
5676
|
/**
|
|
5826
5677
|
* Is the value a fulfilled _Promise_ result?
|
|
5827
5678
|
*
|
|
@@ -5836,8 +5687,6 @@ export declare function isFulfilled<Value>(value: unknown): value is FulfilledPr
|
|
|
5836
5687
|
* @returns `true` if the value is a rejected _Promise_ result, otherwise `false`
|
|
5837
5688
|
*/
|
|
5838
5689
|
export declare function isRejected(value: unknown): value is RejectedPromise;
|
|
5839
|
-
//#endregion
|
|
5840
|
-
//#region src/promise/misc.d.ts
|
|
5841
5690
|
/**
|
|
5842
5691
|
* Create a cancelable _Promise_
|
|
5843
5692
|
*
|
|
@@ -5867,8 +5716,6 @@ export declare function toResult<Value>(callback: () => Promise<Value>): Promise
|
|
|
5867
5716
|
* @returns Promised result
|
|
5868
5717
|
*/
|
|
5869
5718
|
export declare function toResult<Value>(promise: Promise<Value>): Promise<Result<Value>>;
|
|
5870
|
-
//#endregion
|
|
5871
|
-
//#region src/promise/timed.d.ts
|
|
5872
5719
|
/**
|
|
5873
5720
|
* @internal
|
|
5874
5721
|
*/
|
|
@@ -5889,8 +5736,6 @@ export declare function timed<Value>(promise: Promise<Value>, options: RequiredK
|
|
|
5889
5736
|
* @returns Timed _Promise_
|
|
5890
5737
|
*/
|
|
5891
5738
|
export declare function timed<Value>(promise: Promise<Value>, time: number): Promise<Value>;
|
|
5892
|
-
//#endregion
|
|
5893
|
-
//#region src/internal/result/attempt.d.ts
|
|
5894
5739
|
/**
|
|
5895
5740
|
* Executes a _Promise_, catching any errors, and returns a result
|
|
5896
5741
|
*
|
|
@@ -5947,8 +5792,6 @@ export declare function attempt<Value>(callback: () => Value): Result<Value, Err
|
|
|
5947
5792
|
export declare namespace attempt {
|
|
5948
5793
|
export var async: typeof asyncAttempt;
|
|
5949
5794
|
}
|
|
5950
|
-
//#endregion
|
|
5951
|
-
//#region src/result/match.d.ts
|
|
5952
5795
|
/**
|
|
5953
5796
|
* Handles a _Result_ with match callbacks
|
|
5954
5797
|
*
|
|
@@ -5990,8 +5833,6 @@ export declare function matchResult<Value, Returned, E = Error>(result: AnyResul
|
|
|
5990
5833
|
export declare namespace matchResult {
|
|
5991
5834
|
export var async: typeof asyncMatchResult;
|
|
5992
5835
|
}
|
|
5993
|
-
//#endregion
|
|
5994
|
-
//#region src/result/work/flow.d.ts
|
|
5995
5836
|
/**
|
|
5996
5837
|
* Create an asynchronous _Flow_, a function that attempts to pipe a value through a series of functions
|
|
5997
5838
|
*
|
|
@@ -6163,8 +6004,6 @@ export declare function attemptFlow(...fns: GenericCallback[]): (...args: unknow
|
|
|
6163
6004
|
export declare namespace attemptFlow {
|
|
6164
6005
|
export var async: typeof attemptAsyncFlow;
|
|
6165
6006
|
}
|
|
6166
|
-
//#endregion
|
|
6167
|
-
//#region src/result/work/pipe.d.ts
|
|
6168
6007
|
type InitialAsyncPipeValue<Initial> = GenericCallback | Initial | Promise<Initial> | Result<Initial>;
|
|
6169
6008
|
type InitialPipeValue<Initial> = GenericCallback | Initial | Result<Initial>;
|
|
6170
6009
|
type WrapValue<Value> = Result<UnwrapValue<Value>>;
|
|
@@ -6347,8 +6186,6 @@ export declare function attemptPipe<Initial>(initial: InitialPipeValue<Initial>,
|
|
|
6347
6186
|
export declare namespace attemptPipe {
|
|
6348
6187
|
export var async: typeof attemptAsyncPipe;
|
|
6349
6188
|
}
|
|
6350
|
-
//#endregion
|
|
6351
|
-
//#region src/models/string/string.fuzzy.model.d.ts
|
|
6352
6189
|
/**
|
|
6353
6190
|
* Fuzzy searcher for an array of items
|
|
6354
6191
|
*/
|
|
@@ -6470,8 +6307,6 @@ type InternalFuzzy<Item = unknown> = {
|
|
|
6470
6307
|
[FUZZY_SYMBOL]: FuzzyState<Item>;
|
|
6471
6308
|
} & Fuzzy<Item>;
|
|
6472
6309
|
declare const FUZZY_SYMBOL: unique symbol;
|
|
6473
|
-
//#endregion
|
|
6474
|
-
//#region src/string/fuzzy.d.ts
|
|
6475
6310
|
declare function Fuzzy(this: InternalFuzzy, state: FuzzyState<unknown>): void;
|
|
6476
6311
|
/**
|
|
6477
6312
|
* Create a fuzzy searcher for an array of items
|
|
@@ -6520,8 +6355,6 @@ export declare namespace fuzzy {
|
|
|
6520
6355
|
export var is: typeof isFuzzy;
|
|
6521
6356
|
export var match: typeof fuzzyMatch;
|
|
6522
6357
|
}
|
|
6523
|
-
//#endregion
|
|
6524
|
-
//#region src/string/index.d.ts
|
|
6525
6358
|
/**
|
|
6526
6359
|
* Dedent a string template, removing common leading whitespace from each line
|
|
6527
6360
|
*
|
|
@@ -6586,8 +6419,6 @@ export declare function trim(value: string): string;
|
|
|
6586
6419
|
* ```
|
|
6587
6420
|
*/
|
|
6588
6421
|
export declare function truncate(value: string, length: number, suffix?: string): string;
|
|
6589
|
-
//#endregion
|
|
6590
|
-
//#region src/string/match.d.ts
|
|
6591
6422
|
/**
|
|
6592
6423
|
* Check if a string ends with a specified substring
|
|
6593
6424
|
*
|
|
@@ -6639,8 +6470,6 @@ export declare function includes(haystack: string, needle: string, ignoreCase?:
|
|
|
6639
6470
|
* ```
|
|
6640
6471
|
*/
|
|
6641
6472
|
export declare function startsWith(haystack: string, needle: string, ignoreCase?: boolean): boolean;
|
|
6642
|
-
//#endregion
|
|
6643
|
-
//#region src/models/string/string.normalize.model.d.ts
|
|
6644
6473
|
/**
|
|
6645
6474
|
* Options for normalizing a string
|
|
6646
6475
|
*/
|
|
@@ -6681,8 +6510,6 @@ type Normalizer = {
|
|
|
6681
6510
|
normalize(value: string): string;
|
|
6682
6511
|
};
|
|
6683
6512
|
type NormalizerOptions = Required<NormalizeOptions>;
|
|
6684
|
-
//#endregion
|
|
6685
|
-
//#region src/string/normalize.d.ts
|
|
6686
6513
|
declare function Normalizer(this: any, options: NormalizerOptions): void;
|
|
6687
6514
|
/**
|
|
6688
6515
|
* Deburr a string, removing diacritical marks
|
|
@@ -6713,8 +6540,6 @@ export declare function normalize(value: string, options?: NormalizeOptions): st
|
|
|
6713
6540
|
export declare namespace normalize {
|
|
6714
6541
|
export var initialize: typeof initializeNormalizer;
|
|
6715
6542
|
}
|
|
6716
|
-
//#endregion
|
|
6717
|
-
//#region src/models/string/string.template.model.d.ts
|
|
6718
6543
|
/**
|
|
6719
6544
|
* Renderer for a string template with variables
|
|
6720
6545
|
*
|
|
@@ -6757,8 +6582,6 @@ type TemplaterOptions = Required<TemplateOptions>;
|
|
|
6757
6582
|
* Render a template string with variables
|
|
6758
6583
|
*/
|
|
6759
6584
|
type TemplaterRenderer = (variables?: PlainObject) => string;
|
|
6760
|
-
//#endregion
|
|
6761
|
-
//#region src/string/template.d.ts
|
|
6762
6585
|
declare function Templater(this: any, options: TemplaterOptions): void;
|
|
6763
6586
|
/**
|
|
6764
6587
|
* Create a _Templater_ with predefined options
|
|
@@ -6791,8 +6614,6 @@ export declare function template(value: string, variables?: PlainObject, options
|
|
|
6791
6614
|
export declare namespace template {
|
|
6792
6615
|
export var initialize: typeof initializeTemplater;
|
|
6793
6616
|
}
|
|
6794
|
-
//#endregion
|
|
6795
|
-
//#region src/models/value/value.clone.model.d.ts
|
|
6796
6617
|
type CloneOptions = {
|
|
6797
6618
|
/**
|
|
6798
6619
|
* Copy functions instead of returning `undefined`? _(defaults to `false`)_
|
|
@@ -6832,8 +6653,6 @@ type Cloner = {
|
|
|
6832
6653
|
*/
|
|
6833
6654
|
register<Instance>(constructor: Constructor<Instance>, handler?: string | ((value: Instance) => Instance)): void;
|
|
6834
6655
|
};
|
|
6835
|
-
//#endregion
|
|
6836
|
-
//#region src/value/clone.d.ts
|
|
6837
6656
|
declare function Cloner(this: any, options: Required<CloneOptions>): void;
|
|
6838
6657
|
/**
|
|
6839
6658
|
* Clone any kind of value _(deeply, if needed)_
|
|
@@ -6885,8 +6704,6 @@ export declare namespace clone {
|
|
|
6885
6704
|
export var initialize: typeof initializeCloner;
|
|
6886
6705
|
export var register: typeof registerCloner;
|
|
6887
6706
|
}
|
|
6888
|
-
//#endregion
|
|
6889
|
-
//#region src/value/collection.d.ts
|
|
6890
6707
|
/**
|
|
6891
6708
|
* Does the value exist for a key in a _Map_?
|
|
6892
6709
|
*
|
|
@@ -6912,8 +6729,6 @@ export declare function inMap<Key, Value>(map: Map<Key, Value>, value: Value, ke
|
|
|
6912
6729
|
* @returns `true` if the value exists, otherwise `false`
|
|
6913
6730
|
*/
|
|
6914
6731
|
export declare function inSet<Value>(set: Set<Value>, value: Value): boolean;
|
|
6915
|
-
//#endregion
|
|
6916
|
-
//#region src/models/value/value.diff.model.d.ts
|
|
6917
6732
|
/**
|
|
6918
6733
|
* Options for value comparison
|
|
6919
6734
|
*/
|
|
@@ -6957,8 +6772,6 @@ type DiffValue<First = unknown, Second = First> = {
|
|
|
6957
6772
|
*/
|
|
6958
6773
|
to: Second;
|
|
6959
6774
|
};
|
|
6960
|
-
//#endregion
|
|
6961
|
-
//#region src/value/diff.d.ts
|
|
6962
6775
|
/**
|
|
6963
6776
|
* Find the differences between two values
|
|
6964
6777
|
*
|
|
@@ -6968,8 +6781,6 @@ type DiffValue<First = unknown, Second = First> = {
|
|
|
6968
6781
|
* @returns Difference result
|
|
6969
6782
|
*/
|
|
6970
6783
|
export declare function diff<First, Second = First>(first: First, second: Second, options?: DiffOptions): DiffResult<First, Second>;
|
|
6971
|
-
//#endregion
|
|
6972
|
-
//#region src/value/freeze.d.ts
|
|
6973
6784
|
/**
|
|
6974
6785
|
* Freeze an array and its indiced values, but not any nested values
|
|
6975
6786
|
*
|
|
@@ -7107,8 +6918,6 @@ export declare namespace freeze {
|
|
|
7107
6918
|
export var flat: typeof flatFreeze;
|
|
7108
6919
|
export var is: typeof isFrozen;
|
|
7109
6920
|
}
|
|
7110
|
-
//#endregion
|
|
7111
|
-
//#region src/value/omit.d.ts
|
|
7112
6921
|
/**
|
|
7113
6922
|
* Create a new object without the specified keys
|
|
7114
6923
|
*
|
|
@@ -7117,8 +6926,6 @@ export declare namespace freeze {
|
|
|
7117
6926
|
* @returns Partial object without the specified keys
|
|
7118
6927
|
*/
|
|
7119
6928
|
export declare function omit<Value extends PlainObject, ValueKey extends keyof Value>(value: Value, keys: ValueKey[]): Omit<Value, ValueKey>;
|
|
7120
|
-
//#endregion
|
|
7121
|
-
//#region src/value/pick.d.ts
|
|
7122
6929
|
/**
|
|
7123
6930
|
* Create a new object with only the specified keys
|
|
7124
6931
|
*
|
|
@@ -7127,8 +6934,6 @@ export declare function omit<Value extends PlainObject, ValueKey extends keyof V
|
|
|
7127
6934
|
* @returns Partial object with only the specified keys
|
|
7128
6935
|
*/
|
|
7129
6936
|
export declare function pick<Value extends PlainObject, ValueKey extends keyof Value>(value: Value, keys: ValueKey[]): Pick<Value, ValueKey>;
|
|
7130
|
-
//#endregion
|
|
7131
|
-
//#region src/value/shake.d.ts
|
|
7132
6937
|
/**
|
|
7133
6938
|
* Shake an object, removing all keys with `undefined` values
|
|
7134
6939
|
*
|
|
@@ -7136,8 +6941,6 @@ export declare function pick<Value extends PlainObject, ValueKey extends keyof V
|
|
|
7136
6941
|
* @returns Shaken object
|
|
7137
6942
|
*/
|
|
7138
6943
|
export declare function shake<Value extends PlainObject>(value: Value): Shaken<Value>;
|
|
7139
|
-
//#endregion
|
|
7140
|
-
//#region src/value/smush.d.ts
|
|
7141
6944
|
/**
|
|
7142
6945
|
* Smush an object into a flat object that uses dot notation keys
|
|
7143
6946
|
*
|
|
@@ -7145,8 +6948,6 @@ export declare function shake<Value extends PlainObject>(value: Value): Shaken<V
|
|
|
7145
6948
|
* @returns Smushed object with dot notation keys
|
|
7146
6949
|
*/
|
|
7147
6950
|
export declare function smush<Value extends PlainObject>(value: Value): Smushed<Value>;
|
|
7148
|
-
//#endregion
|
|
7149
|
-
//#region src/value/unsmush.d.ts
|
|
7150
6951
|
/**
|
|
7151
6952
|
* Unsmush a smushed object _(turning dot notation keys into nested keys)_
|
|
7152
6953
|
*
|
|
@@ -7154,8 +6955,6 @@ export declare function smush<Value extends PlainObject>(value: Value): Smushed<
|
|
|
7154
6955
|
* @returns Unsmushed object with nested keys
|
|
7155
6956
|
*/
|
|
7156
6957
|
export declare function unsmush<Value extends PlainObject>(value: Value): Unsmushed<Value>;
|
|
7157
|
-
//#endregion
|
|
7158
|
-
//#region src/models/value/value.merge.model.d.ts
|
|
7159
6958
|
/**
|
|
7160
6959
|
* Options for assigning values
|
|
7161
6960
|
*/
|
|
@@ -7227,8 +7026,6 @@ type MergingOptions = {
|
|
|
7227
7026
|
skipNullableAny: boolean;
|
|
7228
7027
|
skipNullableInArrays: boolean;
|
|
7229
7028
|
};
|
|
7230
|
-
//#endregion
|
|
7231
|
-
//#region src/value/merge.d.ts
|
|
7232
7029
|
declare function Assigner(this: any, options: MergingOptions): void;
|
|
7233
7030
|
declare function Merger(this: any, options: MergingOptions): void;
|
|
7234
7031
|
/**
|
|
@@ -7272,8 +7069,6 @@ export declare namespace assign {
|
|
|
7272
7069
|
export declare namespace merge {
|
|
7273
7070
|
export var initialize: typeof initializeMerger;
|
|
7274
7071
|
}
|
|
7275
|
-
//#endregion
|
|
7276
|
-
//#region src/models/value/value.transform.model.d.ts
|
|
7277
7072
|
/**
|
|
7278
7073
|
* A callback transform an object's properties
|
|
7279
7074
|
*/
|
|
@@ -7283,8 +7078,6 @@ type TransformCallback<Value extends PlainObject, Key extends keyof Value> = (ke
|
|
|
7283
7078
|
*/
|
|
7284
7079
|
type TransformCallbacks<Value extends PlainObject> = Partial<{ [Key in keyof Value]: (value: Value[Key]) => Value[Key]; }>;
|
|
7285
7080
|
type TransformHandler<Value extends PlainObject> = TransformCallback<Value, keyof Value> | TransformCallbacks<Value>;
|
|
7286
|
-
//#endregion
|
|
7287
|
-
//#region src/value/transform.d.ts
|
|
7288
7081
|
declare function Transformer(this: any, transformer: ReturnType<typeof getTransformHandler>): void;
|
|
7289
7082
|
declare function getTransformHandler<Value extends PlainObject, Key extends keyof Value>(input: unknown): TransformHandler<Value> | undefined;
|
|
7290
7083
|
/**
|
|
@@ -7324,8 +7117,6 @@ export declare function transform<Value extends PlainObject>(value: Value, trans
|
|
|
7324
7117
|
export declare namespace transform {
|
|
7325
7118
|
export var initialize: typeof initializeTransformer;
|
|
7326
7119
|
}
|
|
7327
|
-
//#endregion
|
|
7328
|
-
//#region src/models/subscription.model.d.ts
|
|
7329
7120
|
type Subscription = {
|
|
7330
7121
|
/**
|
|
7331
7122
|
* Is the subscription active?
|
|
@@ -7357,19 +7148,6 @@ type SubscriptionParameters = {
|
|
|
7357
7148
|
*/
|
|
7358
7149
|
value: unknown;
|
|
7359
7150
|
};
|
|
7360
|
-
/**
|
|
7361
|
-
* Property information for subscription identification
|
|
7362
|
-
*/
|
|
7363
|
-
type SubscriptionProperty = {
|
|
7364
|
-
/**
|
|
7365
|
-
* Name of the property used to identify a subscription
|
|
7366
|
-
*/
|
|
7367
|
-
key: string;
|
|
7368
|
-
/**
|
|
7369
|
-
* Value of the property used to identify a subscription
|
|
7370
|
-
*/
|
|
7371
|
-
value: unknown;
|
|
7372
|
-
};
|
|
7373
7151
|
type Subscriptions<Value = unknown> = {
|
|
7374
7152
|
/**
|
|
7375
7153
|
* Items of the subscriptions store
|
|
@@ -7407,10 +7185,6 @@ type SubscriptionsParameters = {
|
|
|
7407
7185
|
* Allow any or specific keys for subscriptions? _(defaults to `false`, which prevents keyed subscriptions)_
|
|
7408
7186
|
*/
|
|
7409
7187
|
keys?: boolean | Set<Key$1>;
|
|
7410
|
-
/**
|
|
7411
|
-
* Property information for subscription identification
|
|
7412
|
-
*/
|
|
7413
|
-
property?: SubscriptionProperty;
|
|
7414
7188
|
};
|
|
7415
7189
|
type SubscriptionsItems = {
|
|
7416
7190
|
any: Set<Subscription>;
|
|
@@ -7424,8 +7198,6 @@ type SubscriptionsValuesItem<MapKey, MapValue> = {
|
|
|
7424
7198
|
any: Map<MapKey, MapValue>;
|
|
7425
7199
|
keyed?: Map<Key$1, Map<MapKey, MapValue>>;
|
|
7426
7200
|
};
|
|
7427
|
-
//#endregion
|
|
7428
|
-
//#region src/models/beacon.model.d.ts
|
|
7429
7201
|
/**
|
|
7430
7202
|
* A beacon is a lighthouse, holding an observable value that can be subscribed to and emitted from
|
|
7431
7203
|
*/
|
|
@@ -7481,8 +7253,15 @@ type BeaconState<Value> = {
|
|
|
7481
7253
|
observable?: Observable<Value>;
|
|
7482
7254
|
options: Required<BeaconOptions<Value>>;
|
|
7483
7255
|
subscriptions?: Subscriptions<Observer<unknown>>;
|
|
7256
|
+
name: typeof BEACON_NAME;
|
|
7484
7257
|
value: Value;
|
|
7485
7258
|
};
|
|
7259
|
+
type InternalBeacon = {
|
|
7260
|
+
[BEACON_SYMBOL]: BeaconState<unknown>;
|
|
7261
|
+
} & Beacon<unknown>;
|
|
7262
|
+
type InternalObservable = {
|
|
7263
|
+
[BEACON_SYMBOL]: ObservableState<unknown>;
|
|
7264
|
+
} & Observable<unknown>;
|
|
7486
7265
|
type Observable<Value> = {
|
|
7487
7266
|
/**
|
|
7488
7267
|
* Is the observable active?
|
|
@@ -7509,6 +7288,11 @@ type Observable<Value> = {
|
|
|
7509
7288
|
*/
|
|
7510
7289
|
subscribe(observer: Observer<Value>): Subscription;
|
|
7511
7290
|
};
|
|
7291
|
+
type ObservableState<Value> = {
|
|
7292
|
+
active: boolean;
|
|
7293
|
+
beacon: BeaconState<Value>;
|
|
7294
|
+
name: typeof BEACON_OBSERVABLE;
|
|
7295
|
+
};
|
|
7512
7296
|
type Observer<Value> = {
|
|
7513
7297
|
/**
|
|
7514
7298
|
* Callback for when the observable is completed
|
|
@@ -7523,33 +7307,11 @@ type Observer<Value> = {
|
|
|
7523
7307
|
*/
|
|
7524
7308
|
next?: (value: Value) => void;
|
|
7525
7309
|
};
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
* @param value Value to check
|
|
7532
|
-
* @returns `true` if the value is a subscription, otherwise `false`
|
|
7533
|
-
*/
|
|
7534
|
-
export declare function isSubscription(value: unknown): value is Subscription;
|
|
7535
|
-
/**
|
|
7536
|
-
* Is the value a subscriptions store?
|
|
7537
|
-
*
|
|
7538
|
-
* @param value Value to check
|
|
7539
|
-
* @returns `true` if the value is a subscriptions store, otherwise `false`
|
|
7540
|
-
*/
|
|
7541
|
-
export declare function isSubscriptions(value: unknown): value is Subscriptions;
|
|
7542
|
-
/**
|
|
7543
|
-
* Create a subscription store
|
|
7544
|
-
*
|
|
7545
|
-
* @param parameters Store parameters
|
|
7546
|
-
* @returns Subscription store
|
|
7547
|
-
*/
|
|
7548
|
-
export declare function subscriptions<Value = unknown>(parameters?: SubscriptionsParameters): Subscriptions<Value>;
|
|
7549
|
-
//#endregion
|
|
7550
|
-
//#region src/beacon.d.ts
|
|
7551
|
-
declare function Beacon(this: any, value: unknown, options?: BeaconOptions<unknown>): void;
|
|
7552
|
-
declare function Observable(this: any, beacon: BeaconState<unknown>): void;
|
|
7310
|
+
declare const BEACON_NAME = "beacon";
|
|
7311
|
+
declare const BEACON_OBSERVABLE = "observable";
|
|
7312
|
+
declare const BEACON_SYMBOL: unique symbol;
|
|
7313
|
+
declare function Beacon(this: InternalBeacon, value: unknown, options?: BeaconOptions<unknown>): void;
|
|
7314
|
+
declare function Observable(this: InternalObservable, beacon: BeaconState<unknown>): void;
|
|
7553
7315
|
/**
|
|
7554
7316
|
* Create a new beacon
|
|
7555
7317
|
*
|
|
@@ -7565,13 +7327,6 @@ export declare function beacon<Value>(value: Value, options?: BeaconOptions<Valu
|
|
|
7565
7327
|
* @returns `true` if the value is a beacon, otherwise `false`
|
|
7566
7328
|
*/
|
|
7567
7329
|
export declare function isBeacon<Value = unknown>(value: unknown): value is Beacon<Value>;
|
|
7568
|
-
/**
|
|
7569
|
-
* Is the value a beacon subscription?
|
|
7570
|
-
*
|
|
7571
|
-
* @param value Value to check
|
|
7572
|
-
* @returns `true` if the value is a beacon subscription, otherwise `false`
|
|
7573
|
-
*/
|
|
7574
|
-
export declare function isBeaconSubscription(value: unknown): value is Subscription;
|
|
7575
7330
|
/**
|
|
7576
7331
|
* Is the value an observable?
|
|
7577
7332
|
*
|
|
@@ -7579,8 +7334,6 @@ export declare function isBeaconSubscription(value: unknown): value is Subscript
|
|
|
7579
7334
|
* @returns `true` if the value is an observable, otherwise `false`
|
|
7580
7335
|
*/
|
|
7581
7336
|
export declare function isObservable<Value = unknown>(value: unknown): value is Observable<Value>;
|
|
7582
|
-
//#endregion
|
|
7583
|
-
//#region src/models/herald.model.d.ts
|
|
7584
7337
|
type Herald<Events extends Record<string, GenericCallback>> = {
|
|
7585
7338
|
readonly events: HeraldEvents<Events>;
|
|
7586
7339
|
/**
|
|
@@ -7615,11 +7368,8 @@ type HeraldEvents<Events extends Record<string, GenericCallback>> = { [Key in ke
|
|
|
7615
7368
|
type HeraldOnCreate<Events extends Record<string, GenericCallback>> = <Event extends keyof Events>(event: Event, callback: Events[Event], subscription: Subscription) => void;
|
|
7616
7369
|
type HeraldOptions<Events extends Record<string, GenericCallback>> = {
|
|
7617
7370
|
names: Array<keyof Events>;
|
|
7618
|
-
property?: SubscriptionProperty;
|
|
7619
7371
|
onCreate?: HeraldOnCreate<Events>;
|
|
7620
7372
|
};
|
|
7621
|
-
//#endregion
|
|
7622
|
-
//#region src/models/color.model.d.ts
|
|
7623
7373
|
/**
|
|
7624
7374
|
* A color that is represented in multiple color formats
|
|
7625
7375
|
*/
|
|
@@ -7891,8 +7641,6 @@ type ColorValue = string | HSLColor | HWBColor | RGBColor;
|
|
|
7891
7641
|
* Extended color values
|
|
7892
7642
|
*/
|
|
7893
7643
|
type ColorValueExtended = ColorValue | HSLAColor | HWBAColor | RGBAColor;
|
|
7894
|
-
//#endregion
|
|
7895
|
-
//#region src/color/misc/get.d.ts
|
|
7896
7644
|
/**
|
|
7897
7645
|
* Get a foreground color _(usually text)_ based on a background color's luminance as an unprefixed hex color string
|
|
7898
7646
|
*
|
|
@@ -7993,8 +7741,6 @@ export declare function getRgbaColor(value: unknown): RGBAColor;
|
|
|
7993
7741
|
* @returns _RGB_ color
|
|
7994
7742
|
*/
|
|
7995
7743
|
export declare function getRgbColor(value: unknown): RGBColor;
|
|
7996
|
-
//#endregion
|
|
7997
|
-
//#region src/color/misc/is.d.ts
|
|
7998
7744
|
/**
|
|
7999
7745
|
* Is the value a _Color_?
|
|
8000
7746
|
*
|
|
@@ -8061,8 +7807,6 @@ export declare function isRgbaColor(value: unknown): value is RGBAColor;
|
|
|
8061
7807
|
* @returns `true` if the value is an _RGB_ color, otherwise `false`
|
|
8062
7808
|
*/
|
|
8063
7809
|
export declare function isRgbColor(value: unknown): value is RGBColor;
|
|
8064
|
-
//#endregion
|
|
8065
|
-
//#region src/color/space/hex.d.ts
|
|
8066
7810
|
/**
|
|
8067
7811
|
* Get the normalized hex color from a value
|
|
8068
7812
|
*
|
|
@@ -8135,8 +7879,6 @@ export declare function hexToRgb(value: string): RGBColor;
|
|
|
8135
7879
|
* @returns _RGBA_ color
|
|
8136
7880
|
*/
|
|
8137
7881
|
export declare function hexToRgba(value: string): RGBAColor;
|
|
8138
|
-
//#endregion
|
|
8139
|
-
//#region src/color/space/hsl.d.ts
|
|
8140
7882
|
/**
|
|
8141
7883
|
* Convert an _HSL(A)_ color to a hex color _(with optional alpha channel, i.e., opacity)_
|
|
8142
7884
|
*
|
|
@@ -8187,8 +7929,6 @@ export declare function hslToRgb(hsl: HSLAColor | HSLColor): RGBColor;
|
|
|
8187
7929
|
* @returns _RGBA_ color
|
|
8188
7930
|
*/
|
|
8189
7931
|
export declare function hslToRgba(hsl: HSLAColor | HSLColor): RGBAColor;
|
|
8190
|
-
//#endregion
|
|
8191
|
-
//#region src/color/space/hwb.d.ts
|
|
8192
7932
|
/**
|
|
8193
7933
|
* Convert an _HWB(A)_ color to a hex color _(with optional alpha channel, i.e., opacity)_
|
|
8194
7934
|
*
|
|
@@ -8235,8 +7975,6 @@ export declare function hwbToRgb(hwb: HWBAColor | HWBColor): RGBColor;
|
|
|
8235
7975
|
* @returns _RGBA_ color
|
|
8236
7976
|
*/
|
|
8237
7977
|
export declare function hwbToRgba(hwb: HWBAColor | HWBColor): RGBAColor;
|
|
8238
|
-
//#endregion
|
|
8239
|
-
//#region src/color/space/rgb.d.ts
|
|
8240
7978
|
/**
|
|
8241
7979
|
* Convert an _RGB(A)_ color to a hex color _(with optional alpha channel, i.e., opacity)_
|
|
8242
7980
|
*
|
|
@@ -8291,8 +8029,6 @@ export declare function rgbToHwb(rgb: RGBAColor | RGBColor): HWBColor;
|
|
|
8291
8029
|
* @returns _HWBA_ color
|
|
8292
8030
|
*/
|
|
8293
8031
|
export declare function rgbToHwba(rgb: RGBAColor | RGBColor): HWBAColor;
|
|
8294
|
-
//#endregion
|
|
8295
|
-
//#region src/color/index.d.ts
|
|
8296
8032
|
/**
|
|
8297
8033
|
* Get a _Color_ from any kind of value
|
|
8298
8034
|
*
|
|
@@ -8303,8 +8039,6 @@ export declare function rgbToHwba(rgb: RGBAColor | RGBColor): HWBAColor;
|
|
|
8303
8039
|
* @returns _Color_ instance
|
|
8304
8040
|
*/
|
|
8305
8041
|
export declare function getColor(value: unknown): Color;
|
|
8306
|
-
//#endregion
|
|
8307
|
-
//#region src/internal/herald.d.ts
|
|
8308
8042
|
/**
|
|
8309
8043
|
* Create a _Herald_ for announcing named events
|
|
8310
8044
|
*
|
|
@@ -8327,15 +8061,6 @@ export declare function isHerald<Events extends Record<string, GenericCallback>
|
|
|
8327
8061
|
* @returns `true` if the value is events for a herald, otherwise `false`
|
|
8328
8062
|
*/
|
|
8329
8063
|
export declare function isHeraldEvents<Events extends Record<string, GenericCallback> = Record<string, GenericCallback>>(value: unknown): value is HeraldEvents<Events>;
|
|
8330
|
-
/**
|
|
8331
|
-
* Is the value a herald subscription?
|
|
8332
|
-
*
|
|
8333
|
-
* @param value Value to check
|
|
8334
|
-
* @returns `true` if the value is a herald subscription, otherwise `false`
|
|
8335
|
-
*/
|
|
8336
|
-
export declare function isHeraldSubscription(value: unknown): value is Subscription;
|
|
8337
|
-
//#endregion
|
|
8338
|
-
//#region src/internal/is.d.ts
|
|
8339
8064
|
/**
|
|
8340
8065
|
* Is the value an array or a plain object?
|
|
8341
8066
|
*
|
|
@@ -8464,8 +8189,6 @@ export declare function isTemplateStringsArray(value: unknown): value is Templat
|
|
|
8464
8189
|
* @returns `true` if the value is a typed array, otherwise `false`
|
|
8465
8190
|
*/
|
|
8466
8191
|
export declare function isTypedArray(value: unknown): value is TypedArray;
|
|
8467
|
-
//#endregion
|
|
8468
|
-
//#region src/is.d.ts
|
|
8469
8192
|
/**
|
|
8470
8193
|
* Is the value empty, or only containing `null` or `undefined` values?
|
|
8471
8194
|
*
|
|
@@ -8550,8 +8273,6 @@ export declare function isNumerical(value: unknown): value is number | `${number
|
|
|
8550
8273
|
* @returns `true` if the value matches, otherwise `false`
|
|
8551
8274
|
*/
|
|
8552
8275
|
export declare function isObject(value: unknown): value is object;
|
|
8553
|
-
//#endregion
|
|
8554
|
-
//#region src/models/logger.model.d.ts
|
|
8555
8276
|
type Lumberjack = {
|
|
8556
8277
|
/**
|
|
8557
8278
|
* Log any number of values at the "debug" log level
|
|
@@ -8620,8 +8341,6 @@ type TimeLogger = {
|
|
|
8620
8341
|
*/
|
|
8621
8342
|
get stop(): () => void;
|
|
8622
8343
|
};
|
|
8623
|
-
//#endregion
|
|
8624
|
-
//#region src/logger.d.ts
|
|
8625
8344
|
declare function TimeLogger(this: any, label: string): void;
|
|
8626
8345
|
/**
|
|
8627
8346
|
* Is the value a _Logger_?
|
|
@@ -8643,8 +8362,6 @@ declare function isTimeLogger(value: unknown): value is TimeLogger;
|
|
|
8643
8362
|
* _(Logging can be enabled or disabled by setting the `enabled` property)_
|
|
8644
8363
|
*/
|
|
8645
8364
|
declare const Logger: Lumberjack;
|
|
8646
|
-
//#endregion
|
|
8647
|
-
//#region src/internal/math/aggregate.d.ts
|
|
8648
8365
|
/**
|
|
8649
8366
|
* Get the maximum value from a list of items
|
|
8650
8367
|
*
|
|
@@ -8821,8 +8538,6 @@ export declare function min<Item extends PlainObject>(items: Item[], key: keyof
|
|
|
8821
8538
|
* ```
|
|
8822
8539
|
*/
|
|
8823
8540
|
export declare function min(values: number[]): number;
|
|
8824
|
-
//#endregion
|
|
8825
|
-
//#region src/internal/math/misc.d.ts
|
|
8826
8541
|
/**
|
|
8827
8542
|
* Round a number down
|
|
8828
8543
|
*
|
|
@@ -8853,8 +8568,6 @@ export declare function floor(value: number, decimals?: number): number;
|
|
|
8853
8568
|
* ```
|
|
8854
8569
|
*/
|
|
8855
8570
|
export declare function round(value: number, decimals?: number): number;
|
|
8856
|
-
//#endregion
|
|
8857
|
-
//#region src/math.d.ts
|
|
8858
8571
|
/**
|
|
8859
8572
|
* Get the average value from a list of items
|
|
8860
8573
|
*
|
|
@@ -9047,8 +8760,6 @@ export declare function sum<Item extends PlainObject>(items: Item[], key: keyof
|
|
|
9047
8760
|
* ```
|
|
9048
8761
|
*/
|
|
9049
8762
|
export declare function sum(values: number[]): number;
|
|
9050
|
-
//#endregion
|
|
9051
|
-
//#region src/internal/number.d.ts
|
|
9052
8763
|
/**
|
|
9053
8764
|
* Is the number between a minimum and maximum value?
|
|
9054
8765
|
*
|
|
@@ -9101,8 +8812,6 @@ export declare function clamp(value: number, minimum: number, maximum: number, l
|
|
|
9101
8812
|
* ```
|
|
9102
8813
|
*/
|
|
9103
8814
|
export declare function getNumber(value: unknown): number;
|
|
9104
|
-
//#endregion
|
|
9105
|
-
//#region src/query.d.ts
|
|
9106
8815
|
/**
|
|
9107
8816
|
* Convert a query string to a plain _(nested)_ object
|
|
9108
8817
|
*
|
|
@@ -9117,8 +8826,6 @@ export declare function fromQuery(query: string): PlainObject;
|
|
|
9117
8826
|
* @returns Query string representation of the object
|
|
9118
8827
|
*/
|
|
9119
8828
|
export declare function toQuery(parameters: PlainObject): string;
|
|
9120
|
-
//#endregion
|
|
9121
|
-
//#region src/models/queue.model.d.ts
|
|
9122
8829
|
/**
|
|
9123
8830
|
* A queue that can be used to manage (a)synchronous tasks with a specific key
|
|
9124
8831
|
*/
|
|
@@ -9311,8 +9018,6 @@ type Queued<Value> = {
|
|
|
9311
9018
|
readonly promise: Promise<Value extends Promise<infer Result> ? Result : Value>;
|
|
9312
9019
|
};
|
|
9313
9020
|
type Tail<Values extends any[]> = Values extends [infer _, ...infer Rest] ? Rest : never;
|
|
9314
|
-
//#endregion
|
|
9315
|
-
//#region src/queue.d.ts
|
|
9316
9021
|
declare function KeyedQueue(this: any, callback: GenericAsyncCallback, options: Required<QueueOptions>): void;
|
|
9317
9022
|
declare function Queue(this: any, callback: GenericAsyncCallback, options: Required<QueueOptions>, key?: string): void;
|
|
9318
9023
|
/**
|
|
@@ -9366,8 +9071,6 @@ export declare function queue<Callback extends GenericCallback>(callback: Callba
|
|
|
9366
9071
|
export declare namespace queue {
|
|
9367
9072
|
export var keyed: typeof keyedQueue;
|
|
9368
9073
|
}
|
|
9369
|
-
//#endregion
|
|
9370
|
-
//#region src/internal/random.d.ts
|
|
9371
9074
|
/**
|
|
9372
9075
|
* Get a random number between 0 _(inclusive)_ and 1 _(exclusive)_
|
|
9373
9076
|
*
|
|
@@ -9390,8 +9093,6 @@ declare function getRandomFloatingNumber(minimum?: number, maximum?: number): nu
|
|
|
9390
9093
|
* @returns Random integer
|
|
9391
9094
|
*/
|
|
9392
9095
|
export declare function getRandomInteger(minimum?: number, maximum?: number): number;
|
|
9393
|
-
//#endregion
|
|
9394
|
-
//#region src/random.d.ts
|
|
9395
9096
|
/**
|
|
9396
9097
|
* Get a random boolean
|
|
9397
9098
|
*
|
|
@@ -9441,8 +9142,6 @@ export declare function getRandomItems<Value>(array: Value[], amount: number): V
|
|
|
9441
9142
|
* @returns Shuffled version of the original array
|
|
9442
9143
|
*/
|
|
9443
9144
|
export declare function getRandomItems<Value>(array: Value[]): Value[];
|
|
9444
|
-
//#endregion
|
|
9445
|
-
//#region src/sized/set.d.ts
|
|
9446
9145
|
/**
|
|
9447
9146
|
* A _Set_ with a maximum size
|
|
9448
9147
|
*
|
|
@@ -9454,6 +9153,9 @@ export declare class SizedSet<Value = unknown> extends Set<Value> {
|
|
|
9454
9153
|
* Is the _Set_ full?
|
|
9455
9154
|
*/
|
|
9456
9155
|
get full(): boolean;
|
|
9156
|
+
/**
|
|
9157
|
+
* The maximum size of the _Set_
|
|
9158
|
+
*/
|
|
9457
9159
|
get maximum(): number;
|
|
9458
9160
|
/**
|
|
9459
9161
|
* Create a new _SizedSet_ with values and a maximum size _(2^20)_
|
|
@@ -9490,5 +9192,25 @@ export declare class SizedSet<Value = unknown> extends Set<Value> {
|
|
|
9490
9192
|
*/
|
|
9491
9193
|
get(value: Value, update?: boolean): Value | undefined;
|
|
9492
9194
|
}
|
|
9493
|
-
|
|
9494
|
-
|
|
9195
|
+
/**
|
|
9196
|
+
* Is the value a subscription?
|
|
9197
|
+
*
|
|
9198
|
+
* @param value Value to check
|
|
9199
|
+
* @returns `true` if the value is a subscription, otherwise `false`
|
|
9200
|
+
*/
|
|
9201
|
+
export declare function isSubscription(value: unknown): value is Subscription;
|
|
9202
|
+
/**
|
|
9203
|
+
* Is the value a subscriptions store?
|
|
9204
|
+
*
|
|
9205
|
+
* @param value Value to check
|
|
9206
|
+
* @returns `true` if the value is a subscriptions store, otherwise `false`
|
|
9207
|
+
*/
|
|
9208
|
+
export declare function isSubscriptions(value: unknown): value is Subscriptions;
|
|
9209
|
+
/**
|
|
9210
|
+
* Create a subscription store
|
|
9211
|
+
*
|
|
9212
|
+
* @param parameters Store parameters
|
|
9213
|
+
* @returns Subscription store
|
|
9214
|
+
*/
|
|
9215
|
+
export declare function subscriptions<Value = unknown>(parameters?: SubscriptionsParameters): Subscriptions<Value>;
|
|
9216
|
+
export { type ArrayComparisonSorter, type ArrayKeySorter, type ArrayKeySorters, type ArraySorter, type ArraySorters, type ArrayValueSorter, type Asserter, type AssignOptions, type Assigner, type AsyncFailure, type AsyncFlow, type AsyncImmediate, type AsyncLimiter, type AsyncOnce, type AsyncPlan, type AsyncStep, type AsyncSuccess, type Beacon, type BeaconOptions, type CloneOptions, type Cloner, type Color, type ColorType, type ColorTypeExtended, type ColorValue, type ColorValueExtended, type CompareCallback, type ComparisonSorter, type DiffOptions, type DiffResult, type EqualOptions, type Equalizer, type Failure, type Flow, type FulfilledPromise, type Fuzzy, type FuzzyOptions, type FuzzyResult, type HSLAColor, type HSLColor, type HWBAColor, type HWBColor, type Herald, type HeraldEvents, type HeraldOptions, type Immediate, Key$1 as Key, type KeyedQueue, type Limiter, Logger, type Memoized, type MemoizedOptions, type MergeOptions, type Merger, type NormalizeOptions, type Normalizer, type Observable, type Observer, type Once, type Plan, type PlannedError, type PlannedOk, type PlannedReturned, type PromiseOptions, type PromiseStrategy, type PromisesOptions, type Queue, type QueueOptions, type Queued, type RGBAColor, type RGBColor, type RejectedPromise, type Renderer, type Shaken, type Smushed, type SortDirection, type Sorter, type Step, type Subscription, type SubscriptionParameters, type Subscriptions, type SubscriptionsParameters, type Success, type TemplateOptions, type Templater, type TemplaterOptions, type TemplaterRenderer, type TimeLogger, type TransformCallback, type TransformCallbacks, type Transformer, type Unsmushed, push as append, filterAndMap as select, toPromise as fromResult, getRandomFloatingNumber as getRandomFloat, isLogger, isTimeLogger, mapAndFilter as reverseSelect };
|