The element/iterated type of any is any

This commit is contained in:
Jason Freeman
2015-04-14 17:12:53 -07:00
parent 8f57867601
commit cb9954bd20
5 changed files with 30 additions and 4 deletions

View File

@@ -9416,6 +9416,10 @@ module ts {
}
function checkIteratedTypeOrElementType(inputType: Type, errorNode: Node, allowStringInput: boolean): Type {
if (inputType.flags & TypeFlags.Any) {
return inputType;
}
if (languageVersion >= ScriptTarget.ES6) {
return checkIteratedType(inputType, errorNode) || anyType;
}