cafe-utility 33.7.0 → 33.9.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/index.d.ts +5 -1
- package/index.js +470 -456
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -594,6 +594,8 @@ interface Newable<T> extends Function {
|
|
|
594
594
|
}
|
|
595
595
|
declare function multicall(functions: (() => void)[]): () => void
|
|
596
596
|
declare function maxBy<T>(array: T[], fn: (item: T) => number): T
|
|
597
|
+
declare function minBy<T>(array: T[], fn: (item: T) => number): T
|
|
598
|
+
declare function allArrayIndexOf<T>(array: T[], predicate: (item: T) => boolean): number[]
|
|
597
599
|
declare function findInstance<T, K extends T>(array: T[], type: Newable<K>): Optional<K>
|
|
598
600
|
declare function filterInstances<T, K extends T>(array: T[], type: Newable<K>): K[]
|
|
599
601
|
declare function interleave<T, K>(arrayA: T[], arrayB: K[]): (T | K)[]
|
|
@@ -773,7 +775,7 @@ type SolverStepState = 'pending' | 'in-progress' | 'completed' | 'failed' | 'ski
|
|
|
773
775
|
interface SolverStep {
|
|
774
776
|
name: string
|
|
775
777
|
precondition?: (context: Map<string, unknown>) => Promise<boolean>
|
|
776
|
-
action: (context: Map<string, unknown
|
|
778
|
+
action: (context: Map<string, unknown>, zeroIndexedAttemptNumber: number) => Promise<void | 'retry'>
|
|
777
779
|
transientSkipStepName?: string
|
|
778
780
|
}
|
|
779
781
|
export declare class Solver {
|
|
@@ -917,6 +919,8 @@ export declare const Arrays: {
|
|
|
917
919
|
createHierarchy: typeof createHierarchy
|
|
918
920
|
multicall: typeof multicall
|
|
919
921
|
maxBy: typeof maxBy
|
|
922
|
+
minBy: typeof minBy
|
|
923
|
+
allIndexOf: typeof allArrayIndexOf
|
|
920
924
|
}
|
|
921
925
|
export declare const System: {
|
|
922
926
|
sleepMillis: typeof sleepMillis
|