We are currently using AngularJs (v1) with typescript for our project, but we have found the workflow to be overly complex and slow. I am reaching out to the stackoverflow community to seek advice on simplifying our process.
1) Tedious Updates to _references.ts Our team manually updates the _references.ts file whenever a new file is added or removed. Is there a way to automate this process? We have experimented with the "Generate declaration files" option in the typescript project properties, but it doesn't seem to be the solution...
2) Excessive Use of Interfaces In tutorials related to typescript and AngularJs, it's often mentioned that every file should contain interfaces like ISplashScreenController, ISplashScreenControllerScope, and classes like SplashScreenController. While the scope interface serves a clear purpose, do we really need a global interface declaration for each controller? What benefit does it offer over just declaring SplashscreenController?
3) Global Service Injection We frequently use global services like $translate, $q, $timeout, moment, and custom CommonServices throughout our app. It feels cumbersome to inject these services in every controller/service where they are needed. Is there a way to make these services globally accessible without repetitive injections?
For instance, I would like to use a "DateFormatTools" directly in my HTML without the need to inject it into every controller and reference vm.DateFormatTools.format(...)
4) Maintenance Issue with app.ts and Constructor Injections Managing dependencies in both app.ts and constructor injections can be error-prone. Each time a dependency is added or removed, we have to update both $inject array in app.ts and the constructor in splashScreenController.ts. It would be more efficient if dependencies could be specified only within splashScreenController.ts
Your insight and suggestions are greatly appreciated.