[SOLVED][Help] Upgrading JS project to TS

Hi guys,

Tried upgrading my JS sources to TS but the compiler is still looking for the app.js file.

Any guide I could use on how to upgrade your Ionic 2 project with JS to TS?

Thanks in advance.

Look for the line in gulpfile.js that looks somewhat similar to but not quite like this, and make it look like this:

var buildBrowserify = require('ionic-gulp-browserify-typescript');

better start a new project with --ts
ionic start MyIonicApp --v2 --ts

and copy-paste your code into the files of the same name in ts project.
For changing your code according to .ts from .js consider this amazing tutorial. :slight_smile:

I’m encountering plenty of ‘Property does not exist’

Anyway around this?

Declaring all the properties on your classes.

Fixed it by changing "ionic-gulp-browserify-typescript": "^1.1.0", in the package.json file to "ionic-gulp-browserify-typescript": "1.1.0",

From there I declared the variables.

Thanks everyone for the help :slight_smile: