You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same happens in the catch block. Here is my minimal reproduction of the error I run into:
classFoo{abortController: AbortController|undefined=undefined;asyncoperation(){if(this.abortController!==undefined){this.abortController.abort();this.abortController=undefined;}try{this.abortController=newAbortController();// rest of code...}catch(error){if(this.abortController!==undefined){this.abortController.abort();// Property 'abort' does not exist on type 'never'}}}}
Still experiencing this for the simplest of cases as of 4.2.3:
import{performance}from"perf_hooks";letriskyStuffTook=0;functionfoo(){letstart : number;try{start=performance.now();// <- ASSIGNING HERE!!!doRiskyStuff();}finally{riskyStuffTook+=performance.now()-start;// TS2454: Variable 'start' is used before being assigned.}}
TypeScript Version: 3.1.3
Search Terms: try finally block
Code
Expected behavior:
page and browser can be of type puppeteer.Page and puppeteer.Browser
Actual behavior:
compile error message:
error TS2339: Property 'close' does not exist on type 'never'.
Related Issues:
#11665(The different is current issue's code contains a return in try block)
The text was updated successfully, but these errors were encountered: