I am trying to start documenting my Ionic 2 app using JSDoc but I am having difficulty using it with Angular 2's syntax.
For example, I have the following code at the top of my app:
import {App, Events, IonicApp, Platform} from 'ionic-framework/ionic';
import {UserData} from './providers/user-data';
@App({
templateUrl: 'build/app.html',
providers: [UserData],
config: {
}
})
When trying to parse this file, JSDoc gives this error because of @App:
ERROR: Unable to parse /home/user/Projects/mobileApp/app/app.js: Line 4: Unexpected token ILLEGAL
Also, my constructors look like this (I used Ionic 2's tutorial template):
class MyApp {
constructor(app: IonicApp, platform: Platform, events: Events, userData: UserData) {
}
}
And this produces the error:
ERROR: Unable to parse /home/user/Projects/mobileApp/app/app.js: Line 27: Unexpected token :
Could someone please tell me how to get around these errors?
Thanks for any help.