title: Vue3 Plugin Typescript Typings
body: <p>I'm trying to write a plugin with Vue3 in Typescript. However, I'm stuck from the start with how to properly type the plugin function.</p>
  <p>This is what I have so far:</p>
  <pre class="lang-js prettyprint-override"><code>import MyComponent from './src/components/my-component.vue'
  
  import { DefineComponent, Plugin } from 'vue'
  
  const plugin: Plugin = {
      install (app, options?: { [key: string]: any }) {
          app.mixin({
              computed: {
                  classes (this: DefineComponent) {
                      // ...do things to `this`
                  }
              }
          })
  
          app.component('MyComponent', MyComponent)
      }
  }
  
  export default plugin
  
  </code></pre>
  <p>One of the biggest problems is how to deal with <code>this</code> in the context of these functions. There's just red all over the screen at the moment.</p>
  <p>I'm trying to use <code>rollup</code> for bundling.</p>
  <p>This shows no errors, but when imported into another Vue project it blows up.</p>
  <p>How to properly type a plugin function using Typescript, Vue3 and Rollup?</p>