1 | declare const version: string;
|
2 |
|
3 | type WalineAbort = (reason?: any) => void;
|
4 |
|
5 | interface WalinePageviewCountOptions {
|
6 | /**
|
7 | * Waline 服务端地址
|
8 | *
|
9 | * Waline server url
|
10 | */
|
11 | serverURL: string;
|
12 | /**
|
13 | * 浏览量 CSS 选择器
|
14 | *
|
15 | * Pageview CSS selector
|
16 | *
|
17 | * @default '.waline-pageview-count'
|
18 | */
|
19 | selector?: string;
|
20 | /**
|
21 | * 需要更新和获取的路径
|
22 | *
|
23 | * Path to be fetched and updated
|
24 | *
|
25 | * @default window.location.pathname
|
26 | */
|
27 | path?: string;
|
28 | /**
|
29 | * 是否在查询时更新 path 的浏览量
|
30 | *
|
31 | * Whether update pageviews when fetching path result
|
32 | *
|
33 | * @default true
|
34 | */
|
35 | update?: boolean;
|
36 | /**
|
37 | * 错误提示消息所使用的语言
|
38 | *
|
39 | * Language of error message
|
40 | *
|
41 | * @default navigator.language
|
42 | */
|
43 | lang?: string;
|
44 | }
|
45 | declare const pageviewCount: ({ serverURL, path, selector, update, lang, }: WalinePageviewCountOptions) => WalineAbort;
|
46 |
|
47 | export { WalinePageviewCountOptions, pageviewCount, version };
|