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.
This commit is contained in:
Hristo Nedelkov 2024-01-18 19:56:45 +02:00
parent c81914262a
commit 8ff13bf8d2
1 changed files with 3 additions and 2 deletions

View File

@ -21,10 +21,10 @@ type LogsTerminalProps = {
highLightSearched: boolean
}
const fetchMoreData = () => {
const fetchMoreData = (): Promise<DataType[]> => {
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,