From fdcedf86f75401b161675ee57486743f4cb90751 Mon Sep 17 00:00:00 2001 From: Christian Melchior Date: Tue, 19 Jun 2018 09:08:14 +0200 Subject: [PATCH] Docs --- docs/realm.js | 5 +++-- lib/index.d.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/realm.js b/docs/realm.js index 41003e4d..4530d551 100644 --- a/docs/realm.js +++ b/docs/realm.js @@ -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 */ diff --git a/lib/index.d.ts b/lib/index.d.ts index 2bb42836..dcdb1106 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -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(objectSchema: Realm.ObjectSchema): T;