for await (account of accounts) { ... }
Emit an error: "error TS2552: Cannot find name 'account'. Did you mean 'accounts'?"
Thanks.
I assume you have smth like that:
const accounts = [1, 2, 3];
(async () => {
for await (const account of accounts) { }
})()
In this case, there is no need to explicitly type account
const because TS is able to infer the type.
If you still want to use explicit type, you can declare your variable before the for loop
:
const accounts: any[] = [1, 2, 3];
(async () => {
let account: string;
for await (account of accounts) { }
})()