Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 🏷️ Add symbolicEqual function to Typescript definitions #3035

Merged
merged 8 commits into from
Oct 25, 2023
30 changes: 30 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2448,6 +2448,21 @@ declare namespace math {
y: MathType | string
): boolean | MathCollection

/**
* Determines if two expressions are symbolically equal, i.e. one is the
* result of valid algebraic manipulations on the other.
* @param {Node|string} expr1 The first expression to compare
* @param {Node|string} expr2 The second expression to compare
* @param {Object} [options] Optional option object, passed to simplify
* @returns {boolean} Returns true if a valid manipulation making the
* expressions equal is found.
*/
symbolicEqual(
expr1: MathNode | string,
expr2: MathNode | string,
options?: SimplifyOptions
): boolean

/**
* Test whether two values are unequal. The function tests whether the
* relative difference between x and y is larger than the configured
Expand Down Expand Up @@ -5843,6 +5858,21 @@ declare namespace math {
y: MathType | string
): MathJsChain<boolean | MathCollection>

/**
* Determines if two expressions are symbolically equal, i.e. one is the
* result of valid algebraic manipulations on the other.
* @param {Node|string} expr1 The first expression to compare
* @param {Node|string} expr2 The second expression to compare
* @param {Object} [options] Optional option object, passed to simplify
* @returns {boolean} Returns true if a valid manipulation making the
* expressions equal is found.
*/
symbolicEqual(
this: MathJsChain<MathNode | string>,
expr2: MathNode | string,
options?: SimplifyOptions
): boolean

/**
* Test whether two values are unequal. The function tests whether the
* relative difference between x and y is larger than the configured
Expand Down