Replies: 1 comment
-
These cases are worth considering |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The original topic is here #5170
I seem to found an idea to do this, but extensive testing needs to be done.
In short, seems Realm only checks the naming of the model class constructor, no deep checking there, so the idea is we trick the compiler into thinking your own superclass is
Realm.Object<T>
Realmjs version 12.6.2
File 1, BaseModel.tsx
Now File 2, Experimental.tsx
Now to test it
The result will be
To Do
Experimental instanceof BaseModel
, should be yes tho)Any other ideas?
Beta Was this translation helpful? Give feedback.
All reactions