Trouble Building Custom plugin in ionic

Hi,

I am using Ionic to build and app, and trying to make my own Android plugin,

I am using this tutorial https://medium.com/@sangkhim/build-your-first-cordova-plugin-for-ionic-native-38d29a170145

but when i get to the part to use

    export class HelloWorld extends IonicNativePlugin {
  @Cordova({
    successIndex : 1,
    errorIndex : 2
  })
  coolMethod(options: {}): Promise<any> {
    return;
  }
}

I get an exception Object(…) is not a function, About the Cordova and Plugin Decorators.

What do I do? Is there another way to call this plugin?

Thanks.