From a799904c5ef4a5518da33d71be92c83cb0b4e794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=80=D0=BE=D0=BB=D0=BE=D0=B2?= Date: Thu, 29 Jul 2021 11:38:09 +0500 Subject: [PATCH] Add components factory --- src/components/{factory.js => factory.ts} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename src/components/{factory.js => factory.ts} (63%) diff --git a/src/components/factory.js b/src/components/factory.ts similarity index 63% rename from src/components/factory.js rename to src/components/factory.ts index 06269a0..c4a2baf 100644 --- a/src/components/factory.js +++ b/src/components/factory.ts @@ -1,14 +1,14 @@ -export const makeColumn = (title, key, other) => ({ +export const makeColumn = (title:string, key:string, other?:any) => ({ title: title, key: key, dataIndex: key, ...other, }); -export const makeColumnsPlanFact = (title, keyPlan, keyFact, gruopOther) => +export const makeColumnsPlanFact = (title:string, keyPlan:string, keyFact?:string, gruopOther?:any) => { let keyPlanLocal = keyPlan - let keyFactLocal = keyFact + let keyFactLocal = keyFact ?? '' if(!keyFact){ keyPlanLocal = keyPlan + 'Plan'