From b4955b816d09627124de9b12ebebfd17ab6fb696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Wed, 20 Jun 2018 16:07:07 +0200 Subject: [PATCH] Adding documentation --- docs/realm.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/realm.js b/docs/realm.js index 4530d551..8b677bb1 100644 --- a/docs/realm.js +++ b/docs/realm.js @@ -285,6 +285,14 @@ class Realm { */ compact() {} + /** + * Computes the aggregated size of all objects and their history in the Realm. + * + * Note that this will traverse the Realm and might be expensive for large Realms. + * @returns {number} the computed size in bytes. + */ + computeSize() {} + /** * Writes a compacted copy of the Realm to the given path. * @@ -456,4 +464,3 @@ class Realm { * any object of this type from inside the same Realm, and will always be _optional_ * (meaning it may also be assigned `null` or `undefined`). */ -