Remove non-existing dependencies from index.d.ts
Math.js provides the following dependencies from index.d.ts:
evalDependencies eyeDependencies typeofDependencies varDependencies
But they don't seem to exist in the bundle. Importing them causes errors like "Uncaught SyntaxError: The requested module '
They should be removed. Or I'm missing something?
That is a good point. The library is exported in different formats: CommonJS, ES Modules, and an UMD bundle. The bundle doesn't contain the dependencies like evalDependencies. So we can either include them in the bundle (that would increase the bundle size quite a bit), or export two different versions of the type definitions. I'm open to ideas.
The bundle doesn't contain the dependencies like evalDependencies. So we can either include them in the bundle...
Im a little confused, what would we be including in the bundle? Shouldn't only whats defined by this library be exported in the Typescript type definition? Should this entire highlighted block exist at all? https://github.com/josdejong/mathjs/blob/e84ade64053e47f6118f137a7419fbeb1a23dad1/types/index.d.ts#L3753-L4083
- The ESM and CommonJS bundle are created from
/src/index.js. This includes things likeevaluateDependencies, coming from/src/entry/dependenciesAny.generated.js. - The UMD bundle is created from
/src/defaultInstance.js, this excludes things like the dependencies objects to keep the bundle smaller.