From 323adf99aee1b8fff4856e37b1b35a9f162d1ec9 Mon Sep 17 00:00:00 2001 From: Toni Oriol Date: Sun, 27 Oct 2024 14:24:14 +0100 Subject: [PATCH] docs: clarify the examples --- README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index f2fb775..fa9b312 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ interface PricedProduct { const schema = [ { to: 'finalPrice', - fn: ({ source, extra }) => source.price * (1 + extra.taxRate) + fn: ({ source, extra }) => source.price * (1 + extra?.taxRate) } ]; @@ -135,15 +135,6 @@ Transmutes a source object into a target type based on the provided schema. } ``` -3. Combined mapping and transmutation: -```typescript -{ - to: keyof Target; - from: keyof Source; - fn: (args: { source: Source; from?: keyof Source; extra?: Extra }) => unknown; -} -``` - ## License MIT