Updating the libraries in my Angular 8/Electron app produced compilations errors eg, in Electron's menu.ts file, Also, a few of the project external libraries contain @ts-ignore lines, suppressing compilation errors. Some of these have comments "safe to ignore because..." while others don't.

As I couldn't solve the new compilation errors, I've also used @ts.ignore. The app compiles and runs fine.

If I could eliminate compilation errors or prove them harmless, I would. But what to do about the other post-update errors in my code, as well as @ts-ignored errors in libraries? Would ignoring them bring trouble in the future, despite the app seemingly working in the present?

  • 1
    I can only guess you mean warnings. You don't suppress compilation errors. If you run anyway you're running old code that doesn't have your changes. – candied_orange Nov 19 '19 at 13:44
  • That's a good point about the distinction about warnings vs. errors. Perhaps I should edit the post? However, in my case removing @ts.ignore from menu.ts makes the app fail to compile. (Or maybe it's something to do with the "error severity level" in my IDE? Although it was not changed since before the update.) – schrödingercöder Nov 19 '19 at 13:51
  • 1
    It really depends on the error itself. Ignoring compile errors may be latent bugs waiting for the right conditions to surface. However, if you can be sure those conditions can't surface, it might be safe to ignore the error. – Berin Loritsch Nov 19 '19 at 14:20
  • 1
    I'm not as familiar with TS script as I aught to be though. My guess is your error may be related to additional safeties TS enforces that JavaScript does not need. Since it compiles down to JavaScript, the underlying language may be able to handle it OK. – Berin Loritsch Nov 19 '19 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.