TheSpyder / rescript-nodejs

Node bindings for ReScript
MIT License
79 stars 15 forks source link

Fix to runInContext, runInNewContext and runInThisContext signature #23

Closed Enzojz closed 8 months ago

Enzojz commented 8 months ago

According to https://nodejs.org/api/vm.html#scriptrunincontextcontextifiedobject-options, these three functions don't have a second parameter of string type.

These three functions didn't work in my project after build, an exception would be raised, so I fixed this.

TheSpyder commented 8 months ago

Thank you! I’ll verify it soon (I’m travelling at the moment).

I really should add a contribution note about API tests - there aren’t any, so if an API doesn’t work it’s possible you are the first person to use it and you are welcome to submit a fix.