Skip to content

Commit

Permalink
docs: add guide of global components for vue 2 (#1747)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingyue737 committed Aug 26, 2022
1 parent dd9b361 commit 2ca8fd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions/vscode-vue-language-features/README.md
Expand Up @@ -90,7 +90,9 @@ For Global components, you need to define `GlobalComponents` interface, for exam

```typescript
// components.d.ts
declare module '@vue/runtime-core' {
declare module '@vue/runtime-core' { // Vue 3
// declare module 'vue' { // Vue 2.7
// declare module '@vue/runtime-dom' { // Vue <= 2.6.14
export interface GlobalComponents {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Expand Down

0 comments on commit 2ca8fd3

Please sign in to comment.