From 8ff13bf8d28152bf19f99aa80925d873b754ff67 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Thu, 18 Jan 2024 19:56:45 +0200 Subject: [PATCH] fix error must have a '[Symbol.iterator]()' Error: src/pages/LogsPage/LogsTerminal.tsx(59,44): error TS2488: Type 'unknown' must have a '[Symbol.iterator]()' method that returns an iterator. --- src/pages/LogsPage/LogsTerminal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/LogsPage/LogsTerminal.tsx b/src/pages/LogsPage/LogsTerminal.tsx index aeac2789..d02e617f 100644 --- a/src/pages/LogsPage/LogsTerminal.tsx +++ b/src/pages/LogsPage/LogsTerminal.tsx @@ -21,10 +21,10 @@ type LogsTerminalProps = { highLightSearched: boolean } -const fetchMoreData = () => { +const fetchMoreData = (): Promise => { return new Promise(resolve => { setTimeout(() => { - const newData = [] + const newData: DataType[] = [] for (let i = 0; i < 10; i++) { newData.push({ option: `Option ${i}`, description: `Description ${i}` }) } @@ -33,6 +33,7 @@ const fetchMoreData = () => { }) } + const LogsTerminal = ({ windowWidth, timestamps,