Property ‘openDatabase’ does not exist on type ‘SQLite’

I was able to create a new database on login.ts file. Then, I wish top open the same database on a different file called plant.ts file.

Files:

  • login.ts
  • plants.ts
    this.platform.ready().then(() => {

      let db = new SQLite();
      db.openDatabase({
        name: 'data.db',
        location: 'default'
      }).then(() => {
        db.executeSql('CREATE TABLE IF NOT EXISTS plants (id INT PRIMARY KEY, crop TEXT)', {}).then(() => {
        }, (err) => {
          console.error('Unable to execute sql: ', err);
        });
      }, (err) => {
        console.error('Unable to open database: ', err);
      });

    });

However, it is returning...

Property ‘openDatabase’ does not exist on type ‘SQLite’.

enter image description here

Current versions I have for references:

Ionic v4
cordova plugin ls
cordova-plugin-advanced-http 2.3.1 “Advanced HTTP plugin”
cordova-plugin-calendar 5.1.5 “Calendar”
cordova-plugin-device 2.0.2 “Device”
cordova-plugin-file 6.0.2 “File”
cordova-plugin-geolocation 4.0.2 “Geolocation”
cordova-plugin-googlemaps 2.6.2 “cordova-plugin-googlemaps”
cordova-plugin-ionic-keyboard 2.2.0 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 4.1.3 “cordova-plugin-ionic-webview”
cordova-plugin-network-information 2.0.2 “Network Information”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-statusbar 2.4.2 “StatusBar”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-sqlite-storage 4.0.0 “Cordova sqlite storage plugin - cordova-sqlite-storage plugin version”
phonegap-plugin-barcodescanner 8.1.0 “BarcodeScanner”
uk.co.workingedge.cordova.plugin.sqliteporter 1.1.1 “sqlite porter”

There are related questions on stackoverflow

However, it does not resolve the actual question itself and would like to open this answer and would like to resolve it once and for all.

Thank you