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

Ugly type safety #1548

Merged
merged 3 commits into from Apr 3, 2024
Merged

Conversation

inlined
Copy link
Member

@inlined inlined commented Apr 3, 2024

Here's the best I could do to make everything type safe without adding any extra any. Personally, I'm not sure if I care to have this be so complicated or if we should have more anys as well. Just if you do choose to shirk type safety, please make sure fields that shouldn't be defined in the non-auth event types don't have the extra fields.

Should possibly extend test for make*Event to test fields other than data.

Copy link
Contributor

@blidd-google blidd-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made some changes

@blidd-google blidd-google merged commit 3902b80 into blidd.firestore-v2-auth-context Apr 3, 2024
6 checks passed
blidd-google added a commit that referenced this pull request Apr 4, 2024
* add changelog

* update docstrings

* export authtype and add comment

* separate out event type with auth context

* Ugly type safety (#1548)

* consolidate make firestore event fns and simplify typings

---------

Co-authored-by: Brian Li <blidd@google.com>

* add oninit tests

---------

Co-authored-by: Thomas Bouldin <inlined@users.noreply.github.com>
@inlined inlined deleted the inlined.type-help branch April 4, 2024 20:39
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.

None yet

2 participants