Reputation: 3967
I have an Angular 1 app I am converting over to Angular 1.5 and want to start transitioning it to TypeScript. However, it shares an app.js
with the old version and I don't want to overwrite it quite yet with a TypeScript version.
Is there a way for me to leave the app.js module the way it is - and only tsc for the controllers and services?
Because of the nature of the question - I don't really have a code sample. Assume a classic angular.module for the app, and .controller and .factory for the others.
Upvotes: 0
Views: 200
Reputation: 1241
JavaScript is valid TypeScript, therefore you could change any .js
file to .ts
, compile it, and it would be unchanged. Typescript is a superset of JavaScript that adds features to JavaScript, it isn't its own thing (like CoffeeScript).
Upvotes: 1