for await (account of accounts) { ... }
Emit an error: "error TS2552: Cannot find name 'account'. Did you mean 'accounts'?"
Thanks.
How to declare type of an object created dinamicaly by for await in TypeScript
117 views Asked by bbKid At
1
I assume you have smth like that:
In this case, there is no need to explicitly type
accountconst 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: