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'