-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.d.ts
38 lines (32 loc) · 912 Bytes
/
plugin.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
import { App } from 'vue';
// Types copied here to avoid import, which seems to cause problems.
// see https://sourcegraph.com/github.com/unstacked/fathom-client/-/blob/src/index.ts#L2:3-2:16
export type PageViewOptions = {
url?: string;
referrer?: string;
};
export interface VueFathom {
trackGoal(id: string, val?: number): void
trackPageview(opts?: PageViewOptions): void;
}
export interface PluginOptions {
disabled?: boolean;
siteID: string;
// see https://sourcegraph.com/github.com/unstacked/fathom-client/-/blob/src/index.ts#L11:13-11:24
settings: {
url?: string;
auto?: boolean;
honorDNT?: boolean;
canonical?: boolean;
includedDomains?: string[];
excludedDomains?: string[];
spa?: 'auto' | 'history' | 'hash';
}
}
export class VueFathomPlugin {
static install(
app: App,
options: PluginOptions,
): void;
}
export default VueFathomPlugin;