My application is experiencing numerous TypeScript errors, even though it runs correctly. I recently migrated a JavaScript app to TypeScript and am struggling to resolve all the type-related issues. In order to proceed with development, I have configured my editor (WebStorm) to overlook these errors, allowing the app to compile successfully.
While the Just-in-Time (JiT) execution of the app works without any issues, I encounter a problem when attempting to compile the Ahead-of-Time (AoT) version as per the instructions provided in this tutorial. The AoT compilation process fails due to the persistent TypeScript errors. Unfortunately, I cannot provide an exhaustive list of these errors, but here is a representative sample:
Error at C:/app-path/services/app.service.ts:18:23: Property 'saveScroll' does not exist on type 'CanComponentDeactivate'.
Error at C:/app-path/services/app.service.ts:45:20: Parameter 'object' implicitly has an 'any' type.
Error at C:/app-path/services/app.service.ts:48:24: Parameter 'mObject' implicitly has an 'any' type.
Error at C:/app-path/services/app.service.ts:75:30: Property 'value' does not exist on type 'FormBuilder'.
Given the current inability to resolve all the TypeScript errors immediately while still desiring to leverage the benefits of TypeScript, what steps can I take to enable successful compilation?