Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Left hand side of For...of cannot use type annotation, but tslint requires it #786

Closed
BuffCoder opened this issue Nov 9, 2015 · 1 comment

Comments

@BuffCoder
Copy link

When using the TypeScript for...of loop, TSLint throws a typedef error expecting the first variable to have a type definition, however that is not allowed in TypeScript.

Sample:

let names: string[] = [...]
for (let name in names) {
    ...
}

TSLint wants name to have a typedef, however that is not allowed in TypeScript.

@adidahiya
Copy link
Contributor

duplicate of #743

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants