mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
The element/iterated type of any is any
This commit is contained in:
1 parent
8f57867601
commit
cb9954bd20
5 files changed
+30
-4
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user