@lionweb/ts-utils 0.7.2-beta.0 → 0.7.2-beta.2
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/graphs.d.ts +1 -1
- package/dist/graphs.js +1 -1
- package/package.json +1 -1
- package/src/graphs.ts +1 -1
package/dist/graphs.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type ResultMapper<T, R> = (t: T) => R[];
|
|
|
8
8
|
*
|
|
9
9
|
* @param mapper The function that calculates the result values
|
|
10
10
|
* @param nextVertices The function that calculates the next edges to visit.
|
|
11
|
-
* @
|
|
11
|
+
* @return A function that takes a starting vertex and recursively calculates the result values for each vertex visited.
|
|
12
12
|
*/
|
|
13
13
|
export declare const visitAndMap: <T, R>(mapper: ResultMapper<T, R>, nextVertices: (t: T) => T[]) => ResultMapper<T, R>;
|
|
14
14
|
/**
|
package/dist/graphs.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @param mapper The function that calculates the result values
|
|
6
6
|
* @param nextVertices The function that calculates the next edges to visit.
|
|
7
|
-
* @
|
|
7
|
+
* @return A function that takes a starting vertex and recursively calculates the result values for each vertex visited.
|
|
8
8
|
*/
|
|
9
9
|
export const visitAndMap = (mapper, nextVertices) => (startVertex) => {
|
|
10
10
|
const visited = [];
|
package/package.json
CHANGED
package/src/graphs.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type ResultMapper<T, R> = (t: T) => R[]
|
|
|
11
11
|
*
|
|
12
12
|
* @param mapper The function that calculates the result values
|
|
13
13
|
* @param nextVertices The function that calculates the next edges to visit.
|
|
14
|
-
* @
|
|
14
|
+
* @return A function that takes a starting vertex and recursively calculates the result values for each vertex visited.
|
|
15
15
|
*/
|
|
16
16
|
export const visitAndMap =
|
|
17
17
|
<T, R>(mapper: ResultMapper<T, R>, nextVertices: (t: T) => T[]): ResultMapper<T, R> =>
|