-
Type: Task
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Goals
I would like the documentation to match what I'm experiencing from the app.
Expected Results
I would expect that the documentation of and TypeScript type of{{ObjectSchemaProperty}} has a (perhaps optional) "name" field.
At runtime the ObjectSchemaProperty objects read from an ObjectSchema of a Realm opened without specifying the schema has a name property.
Actual Results
The TypeScript types and documentation (https://realm.io/docs/javascript/latest/api/Realm.html#~ObjectSchemaProperty) doesn't mention the name property.
Steps to Reproduce & Code Sample
const Realm = require('realm'); const realm = new Realm({ path: './some.realm' }); const firstObjectSchema = realm.schema[0]; const propertyNames = Object.keys(firstObjectSchema); const firstProperty = firstObjectSchema.properties[propertyNames[0]]; // Outputs the name of the first property twice console.log(propertyNames[0], firstProperty.name);
Version of Realm and Tooling
- Realm JS SDK Version: 2.0.11
- Node or React Native: N/A
- Client OS & Version: N/A
- Which debugger for React Native: N/A