Skip to content

Commit 1e35a39

Browse files
committed
Fix to runInContext, runInNewContext and runInThisContext signature
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.
1 parent 09a2b92 commit 1e35a39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/VM.res

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ module Script = {
2525
external makeWithOptions: (string, options) => t = "Script"
2626
@send external createCachedData: t => Buffer.t = "createCachedData"
2727
@send
28-
external runInContext: (t, string, contextifiedObject<'a>) => 'b = "runInContext"
28+
external runInContext: (t, contextifiedObject<'a>) => 'b = "runInContext"
2929
@send
30-
external runInNewContext: (t, string, contextifiedObject<'a>) => 'b = "runInNewContext"
31-
@send external runInThisContext: (t, string) => 'a = "runInThisContext"
30+
external runInNewContext: (t, contextifiedObject<'a>) => 'b = "runInNewContext"
31+
@send external runInThisContext: t => 'a = "runInThisContext"
3232
}

0 commit comments

Comments
 (0)