Since the official document said: "Hit type is the type of hit", it would be much clear if we use type to define HitType instead of an enum. (#23184)

This commit is contained in:
Calvin Huang
2018-01-30 04:38:32 +08:00
committed by Sheetal Nandi
parent 23faf25636
commit 3dca396263

View File

@@ -39,9 +39,8 @@ interface GoogleAnalytics {
declare namespace UniversalAnalytics {
// https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference
enum HitType {
'pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', 'timing'
}
// https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#hitType
type HitType = 'pageview' | 'screenview' | 'event' | 'transaction' | 'item' | 'social' | 'exception' | 'timing';
// https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference
@@ -294,7 +293,7 @@ declare namespace UniversalAnalytics {
flashVersion?: string;
forceSSL?: boolean;
hitCallback?(): void;
hitType?: string;
hitType?: HitType;
hostname?: string;
id?: string;
javaEnabled?: boolean;