title: How to make a custom decorator globally available to a vue.js 2 app?
body: <p>I created a typescript decorator that adds some additional arguments to the method passed. It works completely fine without the decorator using optional parameters. Most of the times these parameters are not needed to be passed but once in a while these parameters are needed to be passed.</p>
  
  <p>However I see that other developers don't know what the other argument to pass are unless they see the implementation or jsdoc of the method, which they shouldn't be concerned with.</p>
  
  <p>So I created a decorator that will add the parameters in correct order and correct state. Everything works fine however now everyone has to remember to add an additional import to MyDecorator. So I want to make this decorator globally available.</p>
  
  <p>Also in our app we are using decorators for creating components, props, getters, actions. It would be nice if I can make these global too. Almost all our component uses those and putting an import each time is just boilerplate. (nothing wrong with it, just makes it easier for all of us)</p>
  
  <p>This is an example of the app's component syntax with the decorator in pseudo code.</p>
  
  <pre><code>&lt;script lang="ts"&gt;
    import { Vue, Component, Prop, Emit } from 'vue-property-decorator';
    import { MyDecorator } from './src/utils';
    import { Getter } from 'vuex-class';
  
    @Component({})
    export default class MyComponent extends Vue {
      @Getter('something', { namespace: 'whatever' })
      something: number;
  
      mounted() {
        @MyDecorator()
        doSomething('do it please');
      }
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>How all vue components can get the decorators available without using the import? Is it possible?</p>