Skip to content

Commit

Permalink
Make RouterLink and RouterView global components known to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Jan 14, 2023
1 parent ccd304b commit 709f24b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"caf": "*",
"portal-vue": "*",
"uuid": "*",
"vue-demi": "*"
"vue-demi": "*",
"vue-router": "*"
},
"devDependencies": {
"@babel/core": "7.20.12",
Expand Down
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions web.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ declare module 'vue' {
export interface GlobalComponents {
Portal: typeof import('portal-vue')['Portal']
PortalTarget: typeof import('portal-vue')['PortalTarget']

RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
}
declare module '*.vue' {
Expand Down

0 comments on commit 709f24b

Please sign in to comment.