@@ -72,9 +72,9 @@ export interface AnalyticsClassic extends AnalyticsClassicStubs {
72
72
}
73
73
74
74
/**
75
- * Interface implemented by the snippet ('Analytics' )
75
+ * Interface implemented by concrete Analytics class (commonly accessible if you use "await" on AnalyticsBrowser.load() )
76
76
*/
77
- export interface AnalyticsSnippetCore {
77
+ export type AnalyticsCore = {
78
78
track ( ...args : EventParams ) : Promise < DispatchedEvent >
79
79
page ( ...args : PageParams ) : Promise < DispatchedEvent >
80
80
identify ( ...args : UserParams ) : Promise < DispatchedEvent >
@@ -89,18 +89,10 @@ export interface AnalyticsSnippetCore {
89
89
}
90
90
91
91
/**
92
- * Interface implemented by AnalyticsBrowser
92
+ * Interface implemented by AnalyticsBrowser (buffered version of analytics) (commonly accessible through AnalyticsBrowser.load())
93
93
*/
94
- export interface AnalyticsBrowserCore {
95
- track : AnalyticsSnippetCore [ 'track' ]
96
- page : AnalyticsSnippetCore [ 'page' ]
97
- identify : AnalyticsSnippetCore [ 'identify' ]
98
- group ( ) : Promise < Group > // Different than AnalyticsSnippetCore ^
94
+ export type AnalyticsBrowserCore = Omit < AnalyticsCore , 'group' | 'user' > & {
95
+ group ( ) : Promise < Group >
99
96
group ( ...args : UserParams ) : Promise < DispatchedEvent >
100
- alias : AnalyticsSnippetCore [ 'alias' ]
101
- screen : AnalyticsSnippetCore [ 'screen' ]
102
- register : AnalyticsSnippetCore [ 'register' ]
103
- deregister : AnalyticsSnippetCore [ 'deregister' ]
104
- user ( ) : Promise < User > // Different than AnalyticsSnippetCore ^
105
- readonly VERSION : AnalyticsSnippetCore [ 'VERSION' ]
97
+ user ( ) : Promise < User >
106
98
}
0 commit comments