This commit is contained in:
Christian Melchior 2018-06-19 09:08:14 +02:00
parent 2db3ea5853
commit fdcedf86f7
2 changed files with 4 additions and 3 deletions

View File

@ -133,8 +133,9 @@ class Realm {
static automaticSyncConfiguration(user) {}
/**
* Creates a template object where all optional fields are `undefined` and all required fields have the default
* value for the given data type, i.e. `0`, false and `""`.
* Creates a template object for a Realm model class where all optional fields are `undefined` and all required
* fields have the default value for the given data type, either the value set by the `default` property in the
* schema or the default value for the datatype if the schema doesn't specify one, i.e. `0`, false and `""`.
*
* @param {Realm~ObjectSchema} schema object describing the class
*/

2
lib/index.d.ts vendored
View File

@ -621,7 +621,7 @@ declare class Realm {
static automaticSyncConfiguration(user?: Realm.Sync.User): string;
/**
* FIXME
* @param {Realm.ObjectSchema} object schema describing the object that should be created.
* @returns {T}
*/
static createTemplateObject<T>(objectSchema: Realm.ObjectSchema): T;