Skip to content

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.

1 participant