Skip to content

Ugly type safety - #1548

Merged
blidd-google merged 3 commits into
blidd.firestore-v2-auth-contextfrom
inlined.type-help
Apr 3, 2024
Merged

blidd-google merged 3 commits into
blidd.firestore-v2-auth-contextfrom
inlined.type-help

Conversation

@inlined

@inlined inlined commented Apr 3, 2024

Copy link
Copy Markdown
Member

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.

@inlined
inlined requested a review from blidd-google April 3, 2024 15:10

@blidd-google blidd-google left a comment

Copy link
Copy Markdown
Contributor

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
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 <[email protected]>

* add oninit tests

---------

Co-authored-by: Thomas Bouldin <[email protected]>
@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.

2 participants