Closed boskiv closed 11 months ago
Hi,
Thanks for pointing that out, and sorry for the inconvenience. Before the v3 version, this lib was plain JavaScript without TypeScript types. As of 3.0, I migrated to TypeScript, which now (correctly) defines the return value of evaluate() as number|number[].
The reason for this is that you can call evaluate() with an array of input values, instead of a single value: by doing so, evaluate also returns an array of results, one for each input.
So the return type is correct, but was not defined before. Hope you can live with that, your workaround is a reasonable way to go in this case.
I have a typescript error with that code (from v2) after upgrading to v3. Is there correct migration procedure?
UPD. At this moment I made a cast workaround