Re:Angular 2 Release Candidate
by georgefrick on Tuesday May 03, 2016 @10:22AM
(#11620927)
I'm using ts-loader, have you tried both and found awesome-typescript-loader to be better? I'm trying to decide if I should switch to it..
Re:Angular 2 Release Candidate
by lucisferre on Tuesday May 03, 2016 @12:20PM
(#11622001)
This is exactly what we're doig.
As of TypeScript 1.8(?) you can set an "allowJs: true" flag in tsconfig.json, which tells TypeScript to include JS files in your build.
Then you can just manually add type annotations and ES2015/2016 goodness to your code and change the suffix to '.ts' on a file-by-file approach.
I'm doing this at the moment with a fairly large AngularJS 1.5 project, using Webpack with awesome-typescript-loader as the build system, and it's working perfectly so far.