From 42220e7b0d04dba28bc3484f65e4ca57f90607c4 Mon Sep 17 00:00:00 2001 From: croraf Date: Mon, 6 May 2024 15:54:00 +0200 Subject: [PATCH] Fix description for util_base.ts `assert` function --- tfjs-core/src/util_base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfjs-core/src/util_base.ts b/tfjs-core/src/util_base.ts index cb7498b21df..45033f75e97 100644 --- a/tfjs-core/src/util_base.ts +++ b/tfjs-core/src/util_base.ts @@ -139,7 +139,7 @@ export function distSquared(a: FlatVector, b: FlatVector): number { * * ```js * const x = 2; - * tf.util.assert(x === 2, 'x is not 2'); + * tf.util.assert(x === 2, () => 'x is not 2'); * ``` * * @param expr The expression to assert (as a boolean).