josdejong / mathjs

An extensive math library for JavaScript and Node.js
https://mathjs.org
Apache License 2.0
14.32k stars 1.24k forks source link

Module '"mathjs"' has no exported member 'symbolicEqual' #3259

Closed ikcede closed 2 weeks ago

ikcede commented 2 weeks ago

Bug

The latest NPM version of mathjs does not export the symbolicEqual function for Typescript.

To Reproduce

# Install mathjs
npm install mathjs
// page.ts: Try to import symbolicEqual
import {symbolicEqual} from 'mathjs'

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:

// page.ts
import {symbolicEqual} from 'mathjs'
console.log(symbolcEqual('1 + 2', '2 + 1') // true
josdejong commented 2 weeks ago

Thanks for reporting, I've implemented a fix (not yet published)