@@ -72,9 +72,9 @@ export interface AnalyticsClassic extends AnalyticsClassicStubs {
7272}
7373
7474/**
75- * Interface implemented by the snippet ('Analytics' )
75+ * Interface implemented by concrete Analytics class (commonly accessible if you use "await" on AnalyticsBrowser.load() )
7676 */
77- export interface AnalyticsSnippetCore {
77+ export type AnalyticsCore = {
7878 track ( ...args : EventParams ) : Promise < DispatchedEvent >
7979 page ( ...args : PageParams ) : Promise < DispatchedEvent >
8080 identify ( ...args : UserParams ) : Promise < DispatchedEvent >
@@ -89,18 +89,10 @@ export interface AnalyticsSnippetCore {
8989}
9090
9191/**
92- * Interface implemented by AnalyticsBrowser
92+ * Interface implemented by AnalyticsBrowser (buffered version of analytics) (commonly accessible through AnalyticsBrowser.load())
9393 */
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 >
9996 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 >
10698}
0 commit comments