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

document userAgent telemetry #1619

Merged
merged 1 commit into from
Aug 29, 2024
Merged

document userAgent telemetry #1619

merged 1 commit into from
Aug 29, 2024

Conversation

mbostock
Copy link
Member

I was reviewing the telemetry documentation and noticed we forgot to update it for #1604, and that the declared TelemetryEnvironment wasn’t being enforced (because TypeScript allows you to return objects with excess properties). By instead declaring the returned type as a local variable, we can get TypeScript to enforce that the object literal has only the declared properties we intend. I also added a few more type declarations for extra safety.

@mbostock mbostock requested a review from visnup August 29, 2024 01:04
@mbostock mbostock enabled auto-merge (squash) August 29, 2024 01:04
@mbostock mbostock merged commit ea8a121 into main Aug 29, 2024
4 checks passed
@mbostock mbostock deleted the mbostock/fix-telemetry branch August 29, 2024 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants