Talking specifically Angular 1 if you have one, otherwise a general tutorial is fine.
I'm interested in whether it is worth the effort migrating a pretty large frontend codebase.
Talking specifically Angular 1 if you have one, otherwise a general tutorial is fine.
I'm interested in whether it is worth the effort migrating a pretty large frontend codebase.
- Set up your TypeScript config
- Set up Typings (or some other type def manager)
- Rename all ".js" files to ".ts"
- Replace all "var x = require()" calls to "import x = require()"
- Gradually refactor components (controllers, directives, services) to classes, or at least add type annotations to everything.
Because TypeScript is a superset of JavaScript, you can work on an untyped system and add gradual typing until the codebase starts looking nicer. Any new functionality can be implemented in TypeScript; any existing functionality can be slowly refactored when it is touched by changes.