title: Vue.prototype.$property doesn't work with Typescript
body: <p>In main.ts:</p>
  <pre><code>Vue.prototype.$http = http
  </code></pre>
  <p>Then in another component, inside a class i cannot call <code>this.$http</code>. I've read about augmented types, but can't figure out, where to put the file, how to call it, documentation isn't very clear on this topic: <a href="https://v2.vuejs.org/v2/guide/typescript.html#Augmenting-Types-for-Use-with-Plugins" rel="nofollow noreferrer">https://v2.vuejs.org/v2/guide/typescript.html#Augmenting-Types-for-Use-with-Plugins</a></p>
  <p>So i've created a file 'src/types/vue.d.ts':</p>
  <pre><code>import Vue from 'vue'
  import http from '@/http'
  
  declare module 'vue/types/vue' {
    interface Vue {
      $http: http
    }
  }
  </code></pre>
  <p>Contents of http.ts:</p>
  <pre><code>import axios from 'axios'
  
  const HTTP = axios.create({
    baseURL: process.env.VUE_APP_API_URL
  })
  
  export default {
    login(credentials: any) {
      return HTTP.post('/auth', {
        account_email: credentials.email,
        account_password: credentials.password
      })
    }
  }
  </code></pre>
  <p>But still i cannot use <code>this.$http</code> in components. My goal is to use <code>this.$http</code> which referencing to http.ts (axios module here) globally in every component.</p>