Skip to content

fix(gteam-internal): make safePushData options mutually exclusive - #7

Merged
yaroslav-tykhovetskyi-apify merged 1 commit into
masterfrom
fix/gteam-internal-mutually-exclusive-options
Jul 27, 2026
Merged

fix(gteam-internal): make safePushData options mutually exclusive#7
yaroslav-tykhovetskyi-apify merged 1 commit into
masterfrom
fix/gteam-internal-mutually-exclusive-options

Conversation

@yaroslav-tykhovetskyi-apify

Copy link
Copy Markdown
Contributor

Why?

Review feedback on PR #5 (pullrequestreview-4787394810) pointed out that safePushData's alias and eventName options were only kept apart by which overload a caller happened to pick, not by the type system. A caller passing a pre-typed options object with both fields set would slip past the overloads undetected.

What?

Each overload now marks the other option as never, so passing alias and eventName together is a compile-time error instead of a silent runtime choice.

Further notes

Also fixed a pre-existing CHANGELOG.md formatting issue that was failing prettier --check on master.

…ally exclusive

Adds explicit never fields to each overload so passing both alias and
eventName together is a type error instead of a silent runtime choice.
Also fixes pre-existing CHANGELOG.md formatting that was failing
prettier --check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yaroslav-tykhovetskyi-apify
yaroslav-tykhovetskyi-apify merged commit 02ffc12 into master Jul 27, 2026
8 checks passed
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