mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-13 11:46:08 -05:00
fix: [Symbol.iterator]() lost on union with never (#62661)
This commit is contained in:
@@ -45842,6 +45842,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
* the `[Symbol.asyncIterator]()` method first, and then the `[Symbol.iterator]()` method.
|
||||
*/
|
||||
function getIterationTypesOfIterable(type: Type, use: IterationUse, errorNode: Node | undefined) {
|
||||
type = getReducedType(type);
|
||||
if (type === silentNeverType) {
|
||||
return silentNeverIterationTypes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user