Tslint:warning All imports are unused


#1

Hello, recently I have updated my ionic project, but now I see a lot of warnings like this:

But I use that import:

constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, storage: Storage
, private apiService: ApiService, private app: App, private toastCtrl: ToastController, private appUpdate: AppUpdate) {

new LoginUtil(storage, data.data).stoageUserInfo();

}

The questions is why ionic thinks that it not used import?

my package.json{

“ionic-angular”: “^3.5.3”,

"@ionic/app-scripts": “^2.0.2”,
“typescript”: “^2.4.0”
}


#2

Probably related to Ionic 3.5.3 a lot warning about unused imports

Please also post your ionic info output.


#3

ionic info

global packages:

@ionic/cli-utils : 1.5.0
Cordova CLI      : 7.0.1
Ionic CLI        : 3.5.0

local packages:

@ionic/app-scripts              : 2.0.2
@ionic/cli-plugin-cordova       : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms               : android 6.2.3 ios 4.4.0
Ionic Framework                 : ionic-angular 3.5.3

System:

Node       : v6.10.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.2 Build version 8E2002
ios-deploy : 1.9.1
ios-sim    : 5.0.13
npm        : 3.10.10

#4

the warning does not affect my app , just it is a jslint warning;
but have a lot of warning when run ionic serve;


#5

The starter app at the time of writing uses TypeScript 2.3.4. What happens if you go to that version instead of 2.4?


#6

i have try it ,uses typescript 2.3.4; but same warning,:joy::joy::joy: