Angularjs 2

Parameter implicitly has an ‘any’ type

Parameter implicitly has an ‘any’ type

Parameter implicitly has an ‘any’ type, I am working with angular 2 and typescript.  Have implemented my component and have try to run npm start at my termianl but It terminated with the following error : error TS7006: Parameter ‘response’ implicitly has an ‘any’ type

Error Message :

In my application Am trying to integrate Facebook login.

This is my Component :

How to fix Parameter …… implicitly has an ‘any’ type

This is not an error, this is waring, you can disable this globally also.

Step 1 :

Declare variable with type for eg :

public token: any;
public logged: boolean = false;
etc…

Give type to function parameters :

statusChangeCallback(response : any) {
……
}

fbLogin() {
FB.login((result: any) => {
………
}

Step 2 : Disable Globally

Example : 

 

error TS7006 Parameter response implicitly has an any type

Thanks for reading this article.
Hope it will help someone.