Testing #33282
function foo() {
for (let i = 0; i < 10; i++) {
if (i === 5)
return;
}
console.log('Should not be printed');
}
for (let i = 0; i < 10; i++) {
if (i === 5)
return;
}
- try to extract
- nothing happens. No UI feedback why
- change code to:
for (let i = 0; i < 10; i++) {
return;
}
Observe: now it works.
Unclear if TS server provides info on why this is not possible in the first example.