From c24d0da816ff7431247428859dc19210b20b6bb3 Mon Sep 17 00:00:00 2001 From: Ferdinando Papale <4850119+papafe@users.noreply.github.com> Date: Thu, 2 Feb 2023 11:21:15 +0100 Subject: [PATCH] Small correction to docs --- packages/realm/src/assert.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/realm/src/assert.ts b/packages/realm/src/assert.ts index b56e3215e8..39f19a5a41 100644 --- a/packages/realm/src/assert.ts +++ b/packages/realm/src/assert.ts @@ -20,7 +20,8 @@ import { AssertionError, DefaultObject, Realm, TypeAssertionError, binding } fro /** * Expects the condition to be truthy - * @throws {@link Error} If the condition is not truthy. Throws either the {@link err} given as param + * @throws {@link Error} If the condition is not truthy. Throws either the {@link err} given as param if it's an {@link Error}, + * an {@link AssertionError} wrapping {@link err} if it's a string or undefined, or uses the result of invoking {@link err} if it's a function. * @param condition The condition that must be truthy to avoid throwing. * @param err Optional message or error to throw. * Or a function producing this, which is useful to avoid computing the error message in case it's not needed.