The inference of fetchData() is a bit different from the tutorial. On my IDE, it infers as Promise<unknown[]> instead of Promise<any[]>, which makes the second solution not workable unless I change the second Expect of typeof data to unknown. I'm not sure what's causing the issue but it's a bit confusing.

The inference of
fetchData()is a bit different from the tutorial. On my IDE, it infers asPromise<unknown[]>instead ofPromise<any[]>, which makes the second solution not workable unless I change the second Expect of typeof data to unknown. I'm not sure what's causing the issue but it's a bit confusing.