mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-23 07:07:09 -05:00
Fixed a crash when computing flow type of destructured never (#57586)
This commit is contained in:
committed by
GitHub
parent
e089896be4
commit
af0424c010
@@ -43214,7 +43214,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
function getIteratedTypeOrElementType(use: IterationUse, inputType: Type, sentType: Type, errorNode: Node | undefined, checkAssignability: boolean): Type | undefined {
|
||||
const allowAsyncIterables = (use & IterationUse.AllowsAsyncIterablesFlag) !== 0;
|
||||
if (inputType === neverType) {
|
||||
reportTypeNotIterableError(errorNode!, inputType, allowAsyncIterables); // TODO: GH#18217
|
||||
if (errorNode) {
|
||||
reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user