Closed samestep closed 2 years ago
@BertrandBev Thanks so much for merging this! Would you be able to release a new version of the package to npm?
@samestep sorry for the late reply. I just published v2.1.0 to NPM!
@BertrandBev Amazing, thank you! Unfortunately it looks like Eigen.js v0.2.1 on npm is missing dist/index.js
(so it has the types but not the code); would you be able to publish a v0.2.2 which includes that? Sorry for the hassle!
Resolves #33.
A few notes (in no particular order):
src/eigenTest.mjs
tosrc/eigenTest.ts
and observed type errors as a smoke check, but I couldn't figure out how to run that file (e.g. viats-node
) so I undid that change.docs/doc.json
but I don't know how to generate a website from that), but it seems to be fairly out of sync with the code. I'm guessing this is just because it only usessrc/classes/
, which seem to be manually written? In any case, I decided to completely ignore the documentation website while writing these type declarations.src/eigen.d.ts
or otherwise keep it in sync with the rest of the code.objects
andwhitelist
oneig.GC
, or the methodsvGet
andvSet
oneig.Matrix
), so I just exposed everything.src/cpp/embind.cc
defines aComputationInfo
enum,eigen.mjs
does not attach that enum to the exportedeig
object, so currently theinfo
fields onEigenSolverResult
andCareSolverResult
seem to be unusable. This is reflected by the fact thatsrc/eigen.d.ts
equatesComputationInfo
withunknown
.README.md
mention a folder calledbuild/
, butpackage.json
mentions a folder calleddist/
. I just lefteigen.d.ts
insrc/
and toldpackage.json
to use that for thetypes
, since that seemed simplest ifsrc/eigen.d.ts
is handwritten.Let me know if you'd like me to make any changes before merging.