Add types
This commit is contained in:
parent
df6d772d8d
commit
279871ce01
1 changed files with 7 additions and 2 deletions
|
@ -120,6 +120,11 @@ export async function getRedactedCurrentLocation(
|
||||||
return origin + pathname + hashStr;
|
return origin + pathname + hashStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface PlatformProperties {
|
||||||
|
appVersion: string,
|
||||||
|
appPlatform: string
|
||||||
|
}
|
||||||
|
|
||||||
export class PosthogAnalytics {
|
export class PosthogAnalytics {
|
||||||
/* Wrapper for Posthog analytics.
|
/* Wrapper for Posthog analytics.
|
||||||
* 3 modes of anonymity are supported, governed by this.anonymity
|
* 3 modes of anonymity are supported, governed by this.anonymity
|
||||||
|
@ -227,13 +232,13 @@ export class PosthogAnalytics {
|
||||||
return anonymity;
|
return anonymity;
|
||||||
}
|
}
|
||||||
|
|
||||||
private registerSuperProperties(properties) {
|
private registerSuperProperties(properties: posthog.Properties) {
|
||||||
if (this.enabled) {
|
if (this.enabled) {
|
||||||
this.posthog.register(properties);
|
this.posthog.register(properties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async getPlatformProperties() {
|
private static async getPlatformProperties(): Promise<PlatformProperties> {
|
||||||
const platform = PlatformPeg.get();
|
const platform = PlatformPeg.get();
|
||||||
let appVersion;
|
let appVersion;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue