From d4dd95a117e39b2a4b90d68b31643456f9ef9bf0 Mon Sep 17 00:00:00 2001 From: myrriad <18502441+myrriad@users.noreply.github.com> Date: Fri, 3 Jun 2022 13:37:56 -0500 Subject: [PATCH] Update typings for evaluate() Add documentation for when an argument is passed to evaluate() --- index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index c106421..19fba5d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -206,8 +206,12 @@ return _.multiply(sum, product) * x.toString() // == sin(14) * // force function calls with evaluate: * x.evaluate().toString() // == 127690464/128901187 + * @param args An object with key-value pairs to be substituted into the expression. + * @example + * let y = nerdamer('P*V=n*R*T').evaluate({ P: 1, V: 2, n: 3, R: 9.8 }); + * y.toString(); // == '2=(147/5)*T' */ - evaluate(): Expression + evaluate(x: {}): Expression /** * Substitutes a given value for another given value