Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(analytics-types): build in next.js #900

Merged
merged 2 commits into from
Oct 21, 2024
Merged

Conversation

Mercy811
Copy link
Contributor

@Mercy811 Mercy811 commented Oct 21, 2024

Summary

Jira: AMP-110387

Fix #883 by referring globalThis['Element'] instead of using infer T to avoid build error in next.js. The root cause is that the syntax infer T extends is introduced in 4.8 https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-8.html#improved-inference-for-infer-types-in-template-string-types.

Test with examples/browser/next-app with typescript 4.6.3

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@Mercy811 Mercy811 reopened this Oct 21, 2024
@Mercy811 Mercy811 merged commit 63be8c3 into main Oct 21, 2024
4 checks passed
@Mercy811 Mercy811 deleted the AMP-110387-fix-nextjs-build branch October 21, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants