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

OnNative marker #71

Closed
wants to merge 5 commits into from
Closed

OnNative marker #71

wants to merge 5 commits into from

Conversation

Daeda88
Copy link
Collaborator

@Daeda88 Daeda88 commented Apr 22, 2024

With changes to the Firestore structure, accessor classes such as ios, android, and js have been moved to extended properties out of necessity. This PR aims to simplify the boilerplate for this by adding an WithNative interface, which annotates the existence of an accessor to the platform specific code.

Since in Javascript the native implementation is often an interface rather than a class, simple typealiasing is impossible for providing accessors. Therefore WithNative must still provide is platform values via extended properties. On JS, the external interfaces can be wrapped in a JsAccessor interface, so that calling WithNative.js points to the interface rather than the class.

This approach is currently only implemented for Firestore. Other modules might want the same implementation out of consistency however.

@Daeda88 Daeda88 closed this Jun 12, 2024
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

1 participant