Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var fork = require('child_process').fork
var filewatcher = require('filewatcher')
var ipc = require('./ipc')
var resolveMain = require('./resolveMain')
var compiler = require('./compiler')
var fs = require('fs')
var tsNodeVersion = require('ts-node').VERSION
var tsVersion = require('typescript').version
var kill = require('tree-kill')
var readline = require('readline')
module.exports = function(script, scriptArgs, nodeArgs, opts) {
if (typeof script !== 'string' || script.length === 0) {
throw new TypeError('`script` must be a string')
}
if (!Array.isArray(scriptArgs)) {
throw new TypeError('`scriptArgs` must be an array')
}
if (!Array.isArray(nodeArgs)) {
throw new TypeError('`nodeArgs` must be an array')
}