-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
44 lines (39 loc) · 1.03 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
interface Window {
// Matomo queue
_paq?: (string | number | undefined)[][];
// Stuff exposed in dev
api?: import("@/api/api");
resourceStore?: import("pinia").Store;
util?: import("@/util");
}
declare const window: Window;
declare module "vue-matomo" {
// See https://github.com/AmazingDreams/vue-matomo/blob/master/src/utils.js
/**
* The default export is the Vue plugin.
* Usage:
* import matomo from "vue-matomo";
* app.use(matomo, {...})
*/
export default import("vue").Plugin;
/**
* Inject `matomoKey` to use the Matomo object.
* Usage:
* const matomo = inject<Matomo>(matomoKey);
* matomo?.trackEvent("Vote", "Up")
*/
export const matomoKey: string;
/**
* This thing is returned when injecting `matomoKey`.
* Extend as needed.
* Fully described on https://developer.matomo.org/api-reference/tracking-javascript
*/
export type Matomo = {
trackEvent: (
category: string,
action: string,
name?: string,
value?: number,
) => void;
};
}