ERROR : Type 'Observable<{}[]>' Is Not Assignable To Type 'AngularFireList'. Ionic

I was trying to push data to the database but it is not going through and it is giving me errors.

This is my .ts file. In the below code this.tasks in the constructor has a red line and I don't know why.

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 
import { AngularFireDatabase , AngularFireObject } from 

selector: 'page-create-quiz',
templateUrl: 'create-quiz.html',
export class CreateQuizPage {
tasks : AngularFireObject <any[] > ; 

constructor(public db:AngularFireDatabase){
this.tasks = this.db.object('/tasks').valueChanges();

ionViewDidLoad() {
console.log('ionViewDidLoad CreateQuizPage');


This is my HTML file

<ion-title>Create you quiz here</ion-title>

<ion-content padding>

<ion-item *ngFor="let task of tasks | async">

  <input type="text" [(ngModel)]="">




Your tasks property shouldn't be typed as a AngularFireObject <any[] > ;.

Given that .valueChanges() will always return an observable, it should be typehinted as Observable<any> (like the example in the documentation)