Gyroscope Ionic Angular Error with constructor

I implemented the gyroscope from https://github.com/NeoLSN/cordova-plugin-gyroscope and then, when i imported it as an Angular i got

Cannot find name ‘constructor’.
And other errors concerning the import below from https://ionicframework.com/docs/native/gyroscope.

Does anyone have a complete version?

    import { Gyroscope, GyroscopeOrientation, GyroscopeOptions } from '@ionic-native/gyroscope/ngx';

    constructor(private gyroscope: Gyroscope) { }

    ...

    let options: GyroscopeOptions = {
    frequency: 1000
    }

     this.gyroscope.getCurrent(options)
    .then((orientation: GyroscopeOrientation) => {
    console.log(orientation.x, orientation.y, orientation.z, orientation.timestamp);
    })
    .catch()


    this.gyroscope.watch()
    .subscribe((orientation: GyroscopeOrientation) => {
    console.log(orientation.x, orientation.y, orientation.z, orientation.timestamp);
    });

Source: Angular Questions