diff --git a/.changeset/rotten-chefs-eat.md b/.changeset/rotten-chefs-eat.md new file mode 100644 index 000000000..27c3cd6b7 --- /dev/null +++ b/.changeset/rotten-chefs-eat.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-next': patch +--- + +Fix ambient import conflict bug diff --git a/packages/browser/src/browser/standalone-analytics.ts b/packages/browser/src/browser/standalone-analytics.ts index 18b73e76a..b89488006 100644 --- a/packages/browser/src/browser/standalone-analytics.ts +++ b/packages/browser/src/browser/standalone-analytics.ts @@ -14,7 +14,7 @@ export interface AnalyticsStandalone extends Analytics { declare global { interface Window { - analytics: AnalyticsStandalone + analytics: AnalyticsSnippet } } @@ -67,5 +67,8 @@ export async function install(): Promise { return } - window.analytics = await AnalyticsBrowser.standalone(writeKey, options) + window.analytics = (await AnalyticsBrowser.standalone( + writeKey, + options + )) as AnalyticsSnippet }