'Parameter 'changes' implicitly has an 'any' type.ts(7006)

Getting this error please tell me how to resolve this thank you.

  getClients(): Observable<Client[]> {
    // get clients with id
    this.clients = this.clientsCollection.snapshotChanges().map(changes => {
      return changes.map(action => {
        const data = action.payload.doc.data() as Client;
        data.id = action.payload.doc.id;
        return data;
      });
    });

    return this.clients;
  }

enter image description here



Solution 1:[1]

Try changing the code to:

snapshotChanges().map((changes:any) => {...})

and

returns changes.map((action: any) ...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Raffael