mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-19 08:24:15 -06:00
--downlevelIteration errors should mention using later targets
This commit is contained in:
parent
6e8e5c10dd
commit
c70cd38e98
@ -25209,7 +25209,7 @@ namespace ts {
|
||||
? downlevelIteration
|
||||
? Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
|
||||
: isIterable
|
||||
? Diagnostics.Type_0_is_not_an_array_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators
|
||||
? Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators
|
||||
: Diagnostics.Type_0_is_not_an_array_type
|
||||
: downlevelIteration
|
||||
? Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts(2,17): error TS2568: Type 'Set<number>' is not an array type. Use compiler option '--downlevelIteration' to allow iterating of iterators.
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts(2,17): error TS2568: Type 'Set<number>' is not an array type. Either use the '--downlevelIteration' compiler option to allow iterating on iterators, or set the '--target' option to 'es2015' or above.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts (1 errors) ====
|
||||
var union: string | Set<number>
|
||||
for (const e of union) { }
|
||||
~~~~~
|
||||
!!! error TS2568: Type 'Set<number>' is not an array type. Use compiler option '--downlevelIteration' to allow iterating of iterators.
|
||||
!!! error TS2568: Type 'Set<number>' is not an array type. Either use the '--downlevelIteration' compiler option to allow iterating on iterators, or set the '--target' option to 'es2015' or above.
|
||||
Loading…
x
Reference in New Issue
Block a user