(allowsStrings, downlevelIteration)
| 83047 | } |
| 83048 | return (use & 128 /* IterationUse.PossiblyOutOfBounds */) ? includeUndefinedInIndexSignature(arrayElementType) : arrayElementType; |
| 83049 | function getIterationDiagnosticDetails(allowsStrings, downlevelIteration) { |
| 83050 | var _a; |
| 83051 | if (downlevelIteration) { |
| 83052 | return allowsStrings |
| 83053 | ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true] |
| 83054 | : [ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true]; |
| 83055 | } |
| 83056 | var yieldType = getIterationTypeOfIterable(use, 0 /* IterationTypeKind.Yield */, inputType, /*errorNode*/ undefined); |
| 83057 | if (yieldType) { |
| 83058 | return [ts.Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, false]; |
| 83059 | } |
| 83060 | if (isES2015OrLaterIterable((_a = inputType.symbol) === null || _a === void 0 ? void 0 : _a.escapedName)) { |
| 83061 | return [ts.Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, true]; |
| 83062 | } |
| 83063 | return allowsStrings |
| 83064 | ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type, true] |
| 83065 | : [ts.Diagnostics.Type_0_is_not_an_array_type, true]; |
| 83066 | } |
| 83067 | } |
| 83068 | function isES2015OrLaterIterable(n) { |
| 83069 | switch (n) { |
no test coverage detected