Using the demo project of angular2-mdl as a guide I ported the tab component and tried to implement it as follow:
import { Component } from \'@angular/core\';
@
use any
or specific type of the variable like ( numbers,string,etc )
public tabChanged(index:any): void {
this.activeIndex = index;
}
It is a check of the type script compiler. You can either remove the check or specify explicitly the any type in the declaration (answer from @Thyagu).
In the tsconfig.json
file, you could change the line
"noImplicitAny": false,
to
"noImplicitAny": true,
for an object, you need to declare the type as
{index} : {index:any}