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
TypeScript 4.4 was released 4 days ago and introduced the following:
try{executeSomeThirdPartyCode();}catch(err){// err: unknown// Error! Property 'message' does not exist on type 'unknown'.console.error(err.message);// Works! We can narrow 'err' from 'unknown' to 'Error'.if(errinstanceofError){console.error(err.message);}}
This breaks the build of yargs (there is no package-lock.json, which seems to be on purpose):
lib/argsert.ts:76:18 - error TS2571: Object is of type 'unknown'.
76 console.warn(err.stack);
~~~
lib/utils/maybe-async-result.ts:22:25 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Error'.
22 return errorHandler(err);
~~~
Found 2 errors.
The text was updated successfully, but these errors were encountered:
ansgarm
added a commit
to ansgarm/yargs
that referenced
this issue
Aug 31, 2021
Hi!
TypeScript 4.4 was released 4 days ago and introduced the following:
This breaks the build of
yargs
(there is nopackage-lock.json
, which seems to be on purpose):The text was updated successfully, but these errors were encountered: