Skip to content

Commit 7dbf04f

Browse files
authored
Update $gtm global property augmentation (#467)
1 parent 5268e63 commit 7dbf04f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"vue-router": "^4.2.5"
9090
},
9191
"peerDependencies": {
92-
"vue": ">= 3.2.0 < 4.0.0"
92+
"vue": ">= 3.2.26 < 4.0.0"
9393
},
9494
"peerDependenciesMeta": {
9595
"vue-router": {

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ export function createGtm(options: VueGtmUseOptions): VueGtmPlugin {
199199
return { install: (app: App) => install(app, options) };
200200
}
201201

202-
// @ts-expect-error: assume that `vue` already brings this dependency
203-
declare module '@vue/runtime-core' {
202+
declare module 'vue' {
204203
// eslint-disable-next-line jsdoc/require-jsdoc
205204
export interface ComponentCustomProperties {
206205
/**
@@ -240,7 +239,6 @@ export default _default;
240239
* @returns The Vue GTM instance if the it was installed, otherwise `undefined`.
241240
*/
242241
export function useGtm(): GtmPlugin | undefined {
243-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
244242
return (
245243
getCurrentInstance()?.appContext?.app?.config?.globalProperties?.$gtm ??
246244
gtmPlugin

0 commit comments

Comments
 (0)