Quantcast
Channel: Argument of type 'unknown' is not assignable to parameter of type '{}' - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Argument of type 'unknown' is not assignable to parameter of type '{}'

$
0
0

Here is my code

 const Res = await fetch(`https://foo0022.firebaseio.com/.json`);        const ResObj = await Res.json();        if (!Res.ok || !ResObj) {           throw new Error("Page Not Found 404");        }         const ResArr = await Object.values(ResObj)            .map(v => Object.values(v).flat())//error            .flat()            .filter(({ title }) => title.includes(Search))

In the line In the line I get this error ".map (v => Object.values (v) .flat ())" I get this error Argument of type 'unknown' is not assignable to parameter of type '{}'.How can this problem be solved?


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images