-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
Problem
In its current form the return type declared for Realm#objectSchema() is an ObjectSchema, when in-fact we know that this will return the "canonical" schema representation, which is much more narrow.
In particular:
- All optional values will actually have values.
- The type of properties will always be a Record<string, ObjectSchemaProperty>.
Solution
Split up the types in the more loose "write" types that users can provide and "read" types for values returned by our more predictable implementation.
How important is this improvement for you?
Fairly niche, but nice to have anyway.