Compiles the given code into the provided context (if no context is supplied, the current context is used), and returns it wrapped inside a function with the given params
.
function
vm.compileFunction
code: string,
params?: readonly string[],
): Function & { cachedData: Buffer<ArrayBufferLike>; cachedDataProduced: boolean; cachedDataRejected: boolean };
@param code
The body of the function to compile.
@param params
An array of strings containing all parameters for the function.