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:
parent
c81914262a
commit
8ff13bf8d2
|
@ -21,10 +21,10 @@ type LogsTerminalProps = {
|
||||||
highLightSearched: boolean
|
highLightSearched: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const fetchMoreData = () => {
|
const fetchMoreData = (): Promise<DataType[]> => {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const newData = []
|
const newData: DataType[] = []
|
||||||
for (let i = 0; i < 10; i++) {
|
for (let i = 0; i < 10; i++) {
|
||||||
newData.push({ option: `Option ${i}`, description: `Description ${i}` })
|
newData.push({ option: `Option ${i}`, description: `Description ${i}` })
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ const fetchMoreData = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const LogsTerminal = ({
|
const LogsTerminal = ({
|
||||||
windowWidth,
|
windowWidth,
|
||||||
timestamps,
|
timestamps,
|
||||||
|
|
Loading…
Reference in New Issue