Closed ikcede closed 2 weeks ago
The latest NPM version of mathjs does not export the symbolicEqual function for Typescript.
# Install mathjs npm install mathjs
// page.ts: Try to import symbolicEqual import {symbolicEqual} from 'mathjs'
The Typescript compiler will error
Adding symbolicEqual to the exported consts at the end of types/index.d.ts fixes the issue as then this code compiles:
types/index.d.ts
// page.ts import {symbolicEqual} from 'mathjs' console.log(symbolcEqual('1 + 2', '2 + 1') // true
Thanks for reporting, I've implemented a fix (not yet published)
Bug
The latest NPM version of mathjs does not export the symbolicEqual function for Typescript.
To Reproduce
The Typescript compiler will error
To Fix
Adding symbolicEqual to the exported consts at the end of
types/index.d.ts
fixes the issue as then this code compiles: