Fix the `simplifyCore` fix
In #2456 I failed to introduce simplifyCore typing to MathJsStatic (it was only added to MathJsChain). This PR fixes that omission. It also changes the return type of the MathJsChain form of simplifyCore to be MathJsChain which is the convention in that environment.
Thanks Josh 👍
I think the definition of the chain method must be:
simplifyCore(): MathJsChain;
since the expr is already in the chain object. Usage is like:
const expr = '2 + 3'
math.chain(expr)
.parse()
.simplifyCore()
.done()
.toString() // 5
And now that we have testing of the TypeScript typing by way of running types/index.ts, please could you add code to the latter file which will verify that math.simplifyCore is correctly typed? Thanks!
I am willing to make the small tweaks it would take to get this mergeable.