'Type script error that "set" does not exist on type "NgProgress" and property "complete" does not exist on type "NgProgress"

I'm developing an app from a tutorial I found online but I keep getting errors saying that "set" and "complete" do not exist on type "NgProgress" despite me adding all necessary imports and downloading the latest npm packages. This has been bugging me for a couple of days, would really appreciate the assistance.

This is the code from home.ts

recog() {
    let lc = this.loading.create({
      content: "Recognizing...",
      spinner: "ios",
      });
    lc.present();
    Tessaract.recognize(this.selectedImage)
      .progress((result) => {
        if (result.status == "recognizing text") {
          this.progress.set(result.progress);
        }
      })
      .catch((e) => {
        alert(e);
      })
      .then((result) => {
        this.imageText = result.text;
      })
      .finally((ress) => {
        this.progress.complete();
        lc.dismiss();
      });
  }

I have gone through all the necessary npm packages and found that the NgProgress import is potentially depracated. I would like to know know why typescript does not recognize the types 'progress.complete' and 'progress.set'.



Sources

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

Source: Stack Overflow

Solution Source