File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 9
9
" Ricardo Gobbo de Souza <[email protected] >"
10
10
],
11
11
"main" : " lib/module.js" ,
12
+ "types" : " types/index.d.ts" ,
12
13
"files" : [
13
- " lib"
14
+ " lib" ,
15
+ " types/*.d.ts"
14
16
],
15
17
"scripts" : {
16
18
"lint" : " eslint --ext .js,.vue ." ,
Original file line number Diff line number Diff line change
1
+ import type Vue from 'vue'
2
+ import type { default as VueAnalytics , InstallOptions } from 'vue-analytics'
3
+ import './vuex'
4
+
5
+ declare module '@nuxt/vue-app' {
6
+ interface Context {
7
+ $ga : VueAnalytics
8
+ }
9
+ interface NuxtAppOptions {
10
+ $ga : VueAnalytics
11
+ }
12
+ }
13
+
14
+ // Nuxt 2.9+
15
+ declare module '@nuxt/types' {
16
+ interface Context {
17
+ $ga : VueAnalytics
18
+ }
19
+
20
+ interface NuxtAppOptions {
21
+ $ga : VueAnalytics
22
+ }
23
+
24
+ interface Configuration {
25
+ googleAnalytics ?: InstallOptions
26
+ }
27
+ }
28
+
29
+ declare module 'vue/types/vue' {
30
+ interface Vue {
31
+ $ga : VueAnalytics
32
+ }
33
+ }
Original file line number Diff line number Diff line change
1
+ import type VueAnalytics from 'vue-analytics'
2
+
3
+ declare module 'vuex' {
4
+ interface Store < S > {
5
+ $ga : VueAnalytics ,
6
+ }
7
+ }
You can’t perform that action at this time.
0 commit comments