-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
62 lines (55 loc) · 1.57 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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;
};
}
/** @see https://github.com/cloudflare/json-schema-tools/blob/master/workspaces/json-schema-walker/README.md */
declare module "@cloudflare/json-schema-walker" {
export type Visitor = (
schema: import("json-schema").JSONSchema7 | boolean,
path: string[],
parent: import("json-schema").JSONSchema7 | undefined,
parentPath: string[],
) => void;
/** Modifies in place */
export function schemaWalk(
schema: import("json-schema").JSONSchema7,
preFunc?: Visitor,
postFunc?: Visitor,
vocabulary?: unknown,
): void;
}