Sz2013
Sz2013

Reputation: 366

Angular 11 error TS7006: Parameter 'xyz' implicitly has an 'any' type

Using Angular 11 , trying to create a Template driven form. The ts file has following code

submit(xyz){
var firstName = form.firstName;
console.log(firstName);

 }

SO I get the error

error TS7006: Parameter 'form' implicitly has an 'any' 
type.

  submit(xyz){

Upvotes: 0

Views: 1219

Answers (1)

user14772481
user14772481

Reputation:

Just give the function and the params a type like:

submit(xyz: object): void {
...

This is just typescript being extremely careful about your types. It's not an error. Just a warning.

Upvotes: 1

Related Questions