From 849dc671d81330bdd4ff855b153bf65734b45875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Zalewski?= Date: Thu, 27 Feb 2020 14:02:10 +0100 Subject: [PATCH 1/2] Fix object/map return value type --- object/map.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object/map.ts b/object/map.ts index ed01d9b5..2b6189aa 100644 --- a/object/map.ts +++ b/object/map.ts @@ -1,6 +1,6 @@ import fromEntries from "./fromEntries"; import mapEntries from "./mapEntries"; -export default (f: (value: any, key: string, context: object) => boolean) => ( +export default (f: (value: any, key: string, context: object) => any) => ( xs: object ): object => fromEntries(mapEntries(f)(xs)); From af8a359c5d5f91d6e641eb0c72d01ecbfbd1e4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Zalewski?= Date: Thu, 27 Feb 2020 14:25:56 +0100 Subject: [PATCH 2/2] Regenerate code and docs after object/map typings change --- README.md | 2 +- object/README.md | 2 +- object/map.json | 2 +- object/map.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index be645bfd..3da35b7a 100644 --- a/README.md +++ b/README.md @@ -2173,7 +2173,7 @@ Maps the given object with the given function. ```typescript ( - f: (value: any, key: string, context: object) => boolean + f: (value: any, key: string, context: object) => any ) => (xs: object) => object ``` diff --git a/object/README.md b/object/README.md index 451f4868..3960c7c7 100644 --- a/object/README.md +++ b/object/README.md @@ -245,7 +245,7 @@ Maps the given object with the given function. ```typescript ( - f: (value: any, key: string, context: object) => boolean + f: (value: any, key: string, context: object) => any ) => (xs: object) => object ``` diff --git a/object/map.json b/object/map.json index 285b441e..106f1850 100644 --- a/object/map.json +++ b/object/map.json @@ -1,7 +1,7 @@ { "name": "map", "description": "Maps the given object with the given function.", - "signature": "(\n f: (value: any, key: string, context: object) => boolean\n) => (xs: object) => object", + "signature": "(\n f: (value: any, key: string, context: object) => any\n) => (xs: object) => object", "examples": [ { "language": "javascript", diff --git a/object/map.md b/object/map.md index 27139942..d72d6108 100644 --- a/object/map.md +++ b/object/map.md @@ -7,7 +7,7 @@ Maps the given object with the given function. ```typescript ( - f: (value: any, key: string, context: object) => boolean + f: (value: any, key: string, context: object) => any ) => (xs: object) => object ```