I have declared a for loop on an array of a specific type. When I use this array in for loop, I get error because typescript detects it as type of string rather than the type of specific item as declared.
const repos: Repo[] = config.get("repos");
for(const repo in repos) {
calculate(repo)
}
I get error that the value that I am passing to calculate is not of type Repo, but of type string.
NOTE: This is not a runtime error. I get it when in VS Code with code ts(2345)