realm-js
realm-js copied to clipboard
Using `declare` in class-based models in the integration tests
What, How & Why?
The update for the integration tests targeting es2022 the default for useDefineForClassFields changed to true, which breaks creating objects via the constructor of a class-based model.
Is this a breaking change for users though?
I wouldn't say so. This is a breaking change introduced when targeting es2022. We should probably find a solution to work around it (which is why I created https://github.com/realm/realm-js/issues/5527). But for now, I wanted to just update the integration tests to use it.
We might want to update our documentation to use declare if that's important.
Yes - I think that would be a good change to make. But that will require users to apply our Babel preset (introduced in this PR). We should definitely document that .. if / when we choose to publish it on NPM.
Closing as it's unlikely this will ever merge.