Types/improve factory dependencies (#2605)
Types/improve factory dependencies (#2605)

* Fix NodeCtor

* Improve types for factory function

Dependencies available in factory callback are now dependent on list of dependencies which are passed in
josdejong/mathjs,josdejong/mathjs,josdejong/mathjs,josdejong/mathjs,josdejong/mathjs