Skip to content

Commit

Permalink
chore(shims): make vue shim use defineComponent
Browse files Browse the repository at this point in the history
 Allows .vue single file components to be imported and used. Since
 the Global Vue API has been deprecated, this file needs to import
 the return type of defineComponent for TypeScript to be able to
 import and use the single file components.
  • Loading branch information
luqven committed Apr 20, 2021
1 parent f5d2b2f commit 461fdf5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/shims-vue.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
declare module '*.vue' {
import Vue from 'vue';
export default Vue;
}
import { defineComponent } from 'vue';
const component: ReturnType<typeof defineComponent>;
export default component;
}

0 comments on commit 461fdf5

Please sign in to comment.