From a5b5dac39f2281462f12f85e93d1fcdd1aa4c594 Mon Sep 17 00:00:00 2001 From: Shruthi Rai Date: Thu, 13 Jan 2022 06:49:08 +0100 Subject: [PATCH 1/3] Replace interface with declare type as it shows errorwhile importing --- react-app/src/component/Legend/DiscreteLegend.tsx | 4 ++-- react-app/src/component/Utils/discreteLegend.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/react-app/src/component/Legend/DiscreteLegend.tsx b/react-app/src/component/Legend/DiscreteLegend.tsx index 67c0d25b..4cc8a0af 100644 --- a/react-app/src/component/Legend/DiscreteLegend.tsx +++ b/react-app/src/component/Legend/DiscreteLegend.tsx @@ -3,11 +3,11 @@ import legendUtil from "../Utils/discreteLegend"; import { scaleOrdinal, select } from "d3"; import { colorTablesArray, colorTablesObj } from "../ColorTableTypes"; -interface ItemColor { +declare type ItemColor = { color: string; } -interface colorLegendProps { +declare type colorLegendProps = { discreteData: { objects: Record }; dataObjectName: string; position: number[]; diff --git a/react-app/src/component/Utils/discreteLegend.ts b/react-app/src/component/Utils/discreteLegend.ts index f4d8a736..5173a48a 100644 --- a/react-app/src/component/Utils/discreteLegend.ts +++ b/react-app/src/component/Utils/discreteLegend.ts @@ -1,4 +1,4 @@ -interface ItemColor { +declare type ItemColor = { color: string; } From 6f852994d5afcd1c9383875832d5e149f1c7c46c Mon Sep 17 00:00:00 2001 From: Shruthi Rai Date: Thu, 13 Jan 2022 07:38:04 +0100 Subject: [PATCH 2/3] fix:lint error --- react-app/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-app/src/index.ts b/react-app/src/index.ts index ca387eb2..bba0de8d 100644 --- a/react-app/src/index.ts +++ b/react-app/src/index.ts @@ -1,6 +1,6 @@ export { ContinuousLegend } from './component/Legend/ContinuousLegend'; -export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend'; export { colorsArray, rgbValues, RGBToHex} from './component/Utils/continousLegend'; +export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend'; export { colorTablesObj, colorTablesArray } from './component/ColorTableTypes'; export { propertiesObj, templateArray } from './component/WelllayerTemplateTypes'; import * as colorTables from './component/color-tables.json'; From c35f15f7a51bae52de35f412f4e496f52989f3cf Mon Sep 17 00:00:00 2001 From: Shruthi Rai Date: Thu, 13 Jan 2022 07:41:17 +0100 Subject: [PATCH 3/3] fix: lint error --- react-app/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-app/src/index.ts b/react-app/src/index.ts index bba0de8d..6f9b750f 100644 --- a/react-app/src/index.ts +++ b/react-app/src/index.ts @@ -1,7 +1,7 @@ export { ContinuousLegend } from './component/Legend/ContinuousLegend'; export { colorsArray, rgbValues, RGBToHex} from './component/Utils/continousLegend'; export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend'; -export { colorTablesObj, colorTablesArray } from './component/ColorTableTypes'; export { propertiesObj, templateArray } from './component/WelllayerTemplateTypes'; +export { colorTablesObj, colorTablesArray } from './component/ColorTableTypes'; import * as colorTables from './component/color-tables.json'; export default colorTables;