<NME> dep-interface.ts
<BEF> ADDFILE
<MSG> add notice about --transpileOnly

<DFF> @@ -0,0 +1,3 @@
+export interface A {
+  //a: string
+}

{'commit': 'diff --git a/.gitignore b/.gitignore\nindex 0b9d221..720a2b6 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -1,5 +1,5 @@\n .DS_Store\n .vagrant\n node_modules\n-npm-debug.log\n+*.log\n .ts-node\n\\ No newline at end of file\ndiff --git a/README.md b/README.md\nindex 7267331..8e5b515 100644\n--- a/README.md\n+++ b/README.md\n@@ -1,6 +1,6 @@\n-# ts-node-dev \n+# ts-node-dev\n \n-> Tweaked version of [node-dev](https://github.com/fgnass/node-dev) that uses [ts-node](https://github.com/TypeStrong/ts-node) under the hood. \n+> Tweaked version of [node-dev](https://github.com/fgnass/node-dev) that uses [ts-node](https://github.com/TypeStrong/ts-node) under the hood.\n \n It restarts target node process when any of required files changes (as standard `node-dev`) but shares [Typescript](https://github.com/Microsoft/TypeScript/) compilation process between restarts. This significantly increases speed of restarting comparing to `node-dev -r ts-node/register ...`, `nodemon -x ts-node ...` variations because there is no need to instantiate `ts-node` compilation each time.\n \n@@ -23,6 +23,7 @@ ts-node-dev [node-dev|ts-node flags] [ts-node-dev flags] [node cli flags] [--] [\n ```\n \n So you just combine [node-dev](https://github.com/fgnass/node-dev) and [ts-node](https://github.com/TypeStrong/ts-node) options (see docs of those packages):\n+\n ```\n ts-node-dev --respawn --transpileOnly server.ts\n ```\n@@ -36,12 +37,14 @@ tsnd --respawn server.ts\n **Also there are additional options specific to `ts-node-dev`:**\n \n - `--prefer-ts` (default: false) - for each `.js` file (that is not in `node_modules`) will try to check if corresponding `.ts` version exists and require it.\n-- `--ignore-watch` (default: []) - files/folders to be [ignored by `node-dev`](https://github.com/fgnass/node-dev#ignore-paths).  **But also this behaviour enhanced:** it will also make up `new RegExp` of passed ignore string and check absolute paths of required files for match. \n-So, to ignore everthing in `node_modules`, just pass `--ignore-watch node_modules`.\n+- `--ignore-watch` (default: []) - files/folders to be [ignored by `node-dev`](https://github.com/fgnass/node-dev#ignore-paths). **But also this behaviour enhanced:** it will also make up `new RegExp` of passed ignore string and check absolute paths of required files for match.\n+  So, to ignore everthing in `node_modules`, just pass `--ignore-watch node_modules`.\n \n - `--debug` - some additional debug output.\n \n-**And some points to notice:**\n+**Caveats and points of notice:**\n+\n+- Especially for large code bases always consider running with `--transpileOnly` flag which is normal for dev workflow and will speed up things greatly. Note, that `ts-node-dev` will not put watch handlers on TS files that contain only types/interfaces (used only for type checking) - this is current limitation by design.\n \n - `--ignore-watch` will NOT affect files ignored by TS compilation. Use `--ignore` option (or `TS_NODE_IGNORE` env variable) to pass **RegExp strings** for filtering files that should not be compiled, by default `/node_modules/` are ignored.\n \ndiff --git a/lib/child-require-hook.js b/lib/child-require-hook.js\nindex 7ab3ab4..d6801ff 100644\n--- a/lib/child-require-hook.js\n+++ b/lib/child-require-hook.js\n@@ -14,20 +14,21 @@ var execCheck = false\n \n var checkFileScript = join(__dirname, \'check-file-exists.js\')\n \n-var waitForFile = function (fileName) {\n+var waitForFile = function(fileName) {\n   var start = new Date().getTime()\n   while (true) {\n     const exists = execCheck\n-      ? execSync([\'node\', checkFileScript, \'"\' + fileName + \'"\'].join(\' \'), { stdio: \'inherit\' }) \n+      ? execSync([\'node\', checkFileScript, \'"\' + fileName + \'"\'].join(\' \'), {\n+          stdio: \'inherit\'\n+        }) || true\n       : fs.existsSync(fileName)\n+\n     if (exists) {\n       return\n     }\n-    var passed = (new Date().getTime() - start)\n+    var passed = new Date().getTime() - start\n     if (timeThreshold && passed > timeThreshold) {\n-      throw new Error(\n-        \'Could not require \' + fileName\n-      )\n+      throw new Error(\'Could not require \' + fileName)\n     }\n   }\n }\n@@ -46,11 +47,11 @@ var compile = (code, fileName) => {\n }\n \n function registerExtensions(extensions) {\n-  extensions.forEach(function (ext) {\n+  extensions.forEach(function(ext) {\n     var old = require.extensions[ext] || require.extensions[\'.js\']\n-    require.extensions[ext] = function (m, fileName) {\n+    require.extensions[ext] = function(m, fileName) {\n       var _compile = m._compile\n-      m._compile = function (code, fileName) {\n+      m._compile = function(code, fileName) {\n         return _compile.call(this, compile(code, fileName), fileName)\n       }\n       return old(m, fileName)\n@@ -65,7 +66,7 @@ function isFileInNodeModules(fileName) {\n function registerJsExtension() {\n   var old = require.extensions[\'.js\']\n   if (allowJs || preferTs) {\n-    require.extensions[\'.js\'] = function (m, fileName) {\n+    require.extensions[\'.js\'] = function(m, fileName) {\n       var tsCode\n       var tsFileName\n       if (preferTs && !isFileInNodeModules(fileName)) {\n@@ -75,11 +76,13 @@ function registerJsExtension() {\n         }\n       }\n       var _compile = m._compile\n-      var isIgnored = ignore && ignore.reduce(function (res, ignore) {\n-        return res || ignore.test(fileName)\n-      }, false)\n+      var isIgnored =\n+        ignore &&\n+        ignore.reduce(function(res, ignore) {\n+          return res || ignore.test(fileName)\n+        }, false)\n       if (tsCode !== undefined || (allowJs && !isIgnored)) {\n-        m._compile = function (code, fileName) {\n+        m._compile = function(code, fileName) {\n           if (tsCode !== undefined) {\n             code = tsCode\n             fileName = tsFileName\n@@ -104,4 +107,4 @@ if (readyFile) {\n   }\n }\n \n-module.exports.registerExtensions = registerExtensions\n\\ No newline at end of file\n+module.exports.registerExtensions = registerExtensions\ndiff --git a/lib/compiler.js b/lib/compiler.js\nindex ae5b449..90d9dae 100644\n--- a/lib/compiler.js\n+++ b/lib/compiler.js\n@@ -13,36 +13,46 @@ var getCompiledPath = require(\'./get-compiled-path\')\n var tmpDir = \'.ts-node\'\n \n var extensions = [\'.ts\', \'.tsx\']\n-var empty = function () { }\n+var empty = function() {}\n var cwd = process.cwd()\n-var comilationInstanceStampt = Math.random().toString().slice(2)\n+var comilationInstanceStampt = Math.random()\n+  .toString()\n+  .slice(2)\n \n var compiler = {\n   allowJs: false,\n   tsConfigPath: \'\',\n-  getCompilationId: function () {\n+  getCompilationId: function() {\n     return comilationInstanceStampt\n   },\n-  getCompiledDir: function () {\n+  getCompiledDir: function() {\n     return path.join(tmpDir, \'compiled\').replace(/\\\\/g, \'/\')\n   },\n-  getCompileReqFilePath: function () {\n-    return path.join(compiler.getCompiledDir(), compiler.getCompilationId() + \'.req\')\n+  getCompileReqFilePath: function() {\n+    return path.join(\n+      compiler.getCompiledDir(),\n+      compiler.getCompilationId() + \'.req\'\n+    )\n   },\n-  getCompilerReadyFilePath: function () {\n-    return path.join(os.tmpdir(), \'ts-node-dev-ready-\' + comilationInstanceStampt)\n+  getCompilerReadyFilePath: function() {\n+    return path\n+      .join(os.tmpdir(), \'ts-node-dev-ready-\' + comilationInstanceStampt)\n       .replace(/\\\\/g, \'/\')\n   },\n-  getChildHookPath: function () {\n-    return path.join(os.tmpdir(), \'ts-node-dev-hook-\' + comilationInstanceStampt + \'.js\')\n+  getChildHookPath: function() {\n+    return path\n+      .join(os.tmpdir(), \'ts-node-dev-hook-\' + comilationInstanceStampt + \'.js\')\n       .replace(/\\\\/g, \'/\')\n   },\n-  writeReadyFile: function () {\n+  writeReadyFile: function() {\n     var fileData = fs.writeFileSync(compiler.getCompilerReadyFilePath(), \'\')\n   },\n-  writeChildHookFile: function (options) {\n-    var fileData = fs.readFileSync(path.join(__dirname, \'child-require-hook.js\'), \'utf-8\')\n-    var compileTimeout = parseInt(options[\'compile-timeout\'])    \n+  writeChildHookFile: function(options) {\n+    var fileData = fs.readFileSync(\n+      path.join(__dirname, \'child-require-hook.js\'),\n+      \'utf-8\'\n+    )\n+    var compileTimeout = parseInt(options[\'compile-timeout\'])\n     if (compileTimeout) {\n       fileData = fileData.replace(\'10000\', compileTimeout.toString())\n     }\n@@ -57,23 +67,46 @@ var compiler = {\n     }\n     if (options[\'ignore\'] !== undefined) {\n       var ignore = options[\'ignore\']\n-      var ignoreVal = !ignore || ignore === \'false\'\n-        ? \'false\'\n-        : \'[\' + (Array.isArray(ignore) ? ignore : ignore.split(/, /))\n-          .map(ignore => \'new RegExp("\' + ignore + \'")\').join(\', \') + \']\'\n-      fileData = fileData.replace(\'var ignore = [/node_modules/]\', \'var ignore = \' + ignoreVal)\n+      var ignoreVal =\n+        !ignore || ignore === \'false\'\n+          ? \'false\'\n+          : \'[\' +\n+            (Array.isArray(ignore) ? ignore : ignore.split(/, /))\n+              .map(ignore => \'new RegExp("\' + ignore + \'")\')\n+              .join(\', \') +\n+            \']\'\n+      fileData = fileData.replace(\n+        \'var ignore = [/node_modules/]\',\n+        \'var ignore = \' + ignoreVal\n+      )\n     }\n-    fileData = fileData.replace(\'var compilationId\', \'var compilationId = "\' + compiler.getCompilationId() + \'"\')\n-    fileData = fileData.replace(\'var compiledDir\', \'var compiledDir = "\' + compiler.getCompiledDir() + \'"\')\n-    fileData = fileData.replace(\'./get-compiled-path\', path.join(__dirname, \'get-compiled-path\').replace(/\\\\/g, \'/\'))\n-    fileData = fileData.replace(\'var readyFile\',\n-      \'var readyFile = "\' + compiler.getCompilerReadyFilePath() + \'"\')\n-    fileData = fileData.replace(/__dirname/, \'"\' + __dirname.replace(/\\\\/g, \'/\') + \'"\')\n+    fileData = fileData.replace(\n+      \'var compilationId\',\n+      \'var compilationId = "\' + compiler.getCompilationId() + \'"\'\n+    )\n+    fileData = fileData.replace(\n+      \'var compiledDir\',\n+      \'var compiledDir = "\' + compiler.getCompiledDir() + \'"\'\n+    )\n+    fileData = fileData.replace(\n+      \'./get-compiled-path\',\n+      path.join(__dirname, \'get-compiled-path\').replace(/\\\\/g, \'/\')\n+    )\n+    fileData = fileData.replace(\n+      \'var readyFile\',\n+      \'var readyFile = "\' + compiler.getCompilerReadyFilePath() + \'"\'\n+    )\n+    fileData = fileData.replace(\n+      /__dirname/,\n+      \'"\' + __dirname.replace(/\\\\/g, \'/\') + \'"\'\n+    )\n     fs.writeFileSync(compiler.getChildHookPath(), fileData)\n   },\n-  init: function (options) {\n+  init: function(options) {\n     var project = options[\'project\']\n-    compiler.tsConfigPath = resolveSync(cwd, typeof project === \'string\' ? project : undefined) || \'\'\n+    compiler.log = options.log\n+    compiler.tsConfigPath =\n+      resolveSync(cwd, typeof project === \'string\' ? project : undefined) || \'\'\n \n     var originalJsHandler = require.extensions[\'.js\']\n     require.extensions[\'.ts\'] = empty\n@@ -86,7 +119,10 @@ var compiler = {\n       try {\n         compilerOptions = JSON.parse(options[\'compilerOptions\'])\n       } catch (e) {\n-        console.log(\'Could not parse compilerOptions\', options[\'compilerOptions\'])\n+        console.log(\n+          \'Could not parse compilerOptions\',\n+          options[\'compilerOptions\']\n+        )\n         console.log(e)\n       }\n     }\n@@ -129,7 +165,7 @@ var compiler = {\n     tsHandler = require.extensions[\'.ts\']\n     compiler.writeChildHookFile(options)\n   },\n-  compileChanged: function (fileName) {\n+  compileChanged: function(fileName) {\n     var ext = path.extname(fileName)\n     if (extensions.indexOf(ext) < 0) return\n     try {\n@@ -143,7 +179,7 @@ var compiler = {\n       console.error(e)\n     }\n   },\n-  compile: function (params) {\n+  compile: function(params) {\n     var fileName = params.compile\n     var code = fs.readFileSync(fileName, \'utf-8\')\n     var compiledPath = params.compiledPath\n@@ -154,23 +190,22 @@ var compiler = {\n     if (fs.existsSync(compiledPath)) {\n       return\n     }\n+    var starTime = new Date().getTime()\n     var m = {\n       _compile: writeCompiled\n     }\n-    tsHandler(m, fileName)    \n+    tsHandler(m, fileName)\n     try {\n       m._compile(code, fileName)\n+      compiler.log.debug(\n+        fileName,\n+        \'compiled in\',\n+        new Date().getTime() - starTime,\n+        \'ms\'\n+      )\n     } catch (e) {\n-      var splits = e.message.split(\'\\n\')\n-      var title = splits.shift()\n-      var message = splits.join(\'\\n\')\n-      // compiler.notify(title, \'\\n\' + message, \'error\')      \n-      // compiler.stop()\n-      // setTimeout(function () {\n-      //   compiler.stop()\n-      // })\n       code = \'throw \' + \'new Error(\' + JSON.stringify(e.message) + \')\' + \';\'\n-      writeCompiled(code)      \n+      writeCompiled(code)\n     }\n   }\n }\ndiff --git a/lib/get-compiled-path.js b/lib/get-compiled-path.js\nindex 9306b4c..437cffc 100644\n--- a/lib/get-compiled-path.js\n+++ b/lib/get-compiled-path.js\n@@ -3,12 +3,11 @@ var path = require(\'path\')\n var cwd = process.cwd()\n \n module.exports = (code, fileName, compiledDir) => {\n-  var hash = crypto.createHash(\'sha256\')\n-    .update(fileName + code, \'utf8\').digest(\'hex\')\n-    fileName = path.relative(cwd, fileName)\n-  var hashed =\n-    fileName.replace(/[^\\w]/g, \'_\') +\n-    \'_\' + hash +\n-    \'.js\'\n+  var hash = crypto\n+    .createHash(\'sha256\')\n+    .update(fileName + code, \'utf8\')\n+    .digest(\'hex\')\n+  fileName = path.relative(cwd, fileName)\n+  var hashed = fileName.replace(/[^\\w]/g, \'_\') + \'_\' + hash + \'.js\'\n   return path.join(compiledDir, hashed)\n-}\n\\ No newline at end of file\n+}\ndiff --git a/lib/index.js b/lib/index.js\nindex 807b3fc..131c102 100644\n--- a/lib/index.js\n+++ b/lib/index.js\n@@ -1,90 +1,96 @@\n-var fork = require(\'child_process\').fork;\n-var filewatcher = require(\'filewatcher\');\n-var ipc = require(\'./ipc\');\n-var resolveMain = require(\'./resolveMain\');\n-var compiler = require(\'./compiler\');\n-var fs = require(\'fs\');\n+var fork = require(\'child_process\').fork\n+var filewatcher = require(\'filewatcher\')\n+var ipc = require(\'./ipc\')\n+var resolveMain = require(\'./resolveMain\')\n+var compiler = require(\'./compiler\')\n+var fs = require(\'fs\')\n const tsNodeVersion = require(\'ts-node\').VERSION\n var tsVersion = require(\'typescript\').version\n \n-module.exports = function (script, scriptArgs, nodeArgs, opts) {\n-  compiler.init(opts)\n+module.exports = function(script, scriptArgs, nodeArgs, opts) {\n   if (typeof script !== \'string\' || script.length === 0) {\n-    throw new TypeError(\'`script` must be a string\');\n+    throw new TypeError(\'`script` must be a string\')\n   }\n \n   if (!Array.isArray(scriptArgs)) {\n-    throw new TypeError(\'`scriptArgs` must be an array\');\n+    throw new TypeError(\'`scriptArgs` must be an array\')\n   }\n \n   if (!Array.isArray(nodeArgs)) {\n-    throw new TypeError(\'`nodeArgs` must be an array\');\n+    throw new TypeError(\'`nodeArgs` must be an array\')\n   }\n \n   // The child_process\n-  var child;\n+  var child\n+\n+  var wrapper = resolveMain(__dirname + \'/wrap.js\')\n+  var main = resolveMain(script)\n+  var cfg = require(\'./cfg\')(main, opts)\n+  var log = require(\'./log\')(cfg)\n+  var notify = require(\'./notify\')(cfg, log)\n+  opts.log = log\n+  compiler.init(opts)\n \n-  var wrapper = resolveMain(__dirname + \'/wrap.js\');\n-  var main = resolveMain(script);\n-  var cfg = require(\'./cfg\')(main, opts);\n-  var log = require(\'./log\')(cfg);\n-  var notify = require(\'./notify\')(cfg, log);\n   compiler.notify = notify\n   compiler.stop = stop\n   // Run ./dedupe.js as preload script\n-  if (cfg.dedupe) process.env.NODE_DEV_PRELOAD = __dirname + \'/dedupe\';\n+  if (cfg.dedupe) process.env.NODE_DEV_PRELOAD = __dirname + \'/dedupe\'\n \n-  var watcher = filewatcher({ forcePolling: opts.poll });\n+  var watcher = filewatcher({ forcePolling: opts.poll })\n   var starting = false\n-  watcher.on(\'change\', function (file) {\n+  watcher.on(\'change\', function(file) {\n     if (file === compiler.tsConfigPath) {\n-      notify(\'Reinitializing TS compilation\');\n-      compiler.init(opts);\n+      notify(\'Reinitializing TS compilation\')\n+      compiler.init(opts)\n     }\n     /* eslint-disable no-octal-escape */\n-    if (cfg.clear) process.stdout.write(\'\\033[2J\\033[H\');\n-    notify(\'Restarting\', file + \' has been modified\');\n+    if (cfg.clear) process.stdout.write(\'\\033[2J\\033[H\')\n+    notify(\'Restarting\', file + \' has been modified\')\n     compiler.compileChanged(file)\n     if (starting) return\n-    watcher.removeAll();\n+    watcher.removeAll()\n     starting = true\n     if (child) {\n       log.debug(\'Child is still running, restart upon exit\')\n-      child.on(\'exit\', start);\n-      stop();\n+      child.on(\'exit\', start)\n+      stop()\n     } else {\n       log.debug(\'Child is already stopped, probably due to a previous error\')\n-      start();\n+      start()\n     }\n-  });\n+  })\n \n-  watcher.on(\'fallback\', function (limit) {\n-    log.warn(\'node-dev ran out of file handles after watching %s files.\', limit);\n-    log.warn(\'Falling back to polling which uses more CPU.\');\n-    log.info(\'Run ulimit -n 10000 to increase the file descriptor limit.\');\n-    if (cfg.deps) log.info(\'... or add `--no-deps` to use less file handles.\');\n-  });\n+  watcher.on(\'fallback\', function(limit) {\n+    log.warn(\'node-dev ran out of file handles after watching %s files.\', limit)\n+    log.warn(\'Falling back to polling which uses more CPU.\')\n+    log.info(\'Run ulimit -n 10000 to increase the file descriptor limit.\')\n+    if (cfg.deps) log.info(\'... or add `--no-deps` to use less file handles.\')\n+  })\n \n   /**\n    * Run the wrapped script.\n    */\n   function start() {\n-    console.log(\'Using ts-node version\', tsNodeVersion + \', typescript version\', tsVersion)\n-    var cmd = nodeArgs.concat(wrapper, script, scriptArgs);\n-    var childHookPath = compiler.getChildHookPath();\n-    cmd = [\'-r\', childHookPath].concat(cmd);\n+    console.log(\n+      \'Using ts-node version\',\n+      tsNodeVersion + \', typescript version\',\n+      tsVersion\n+    )\n+    var cmd = nodeArgs.concat(wrapper, script, scriptArgs)\n+    var childHookPath = compiler.getChildHookPath()\n+    cmd = [\'-r\', childHookPath].concat(cmd)\n     log.debug(\'Starting child process %s\', cmd.join(\' \'))\n     child = fork(cmd[0], cmd.slice(1), {\n       cwd: process.cwd(),\n       env: process.env\n-    });\n+    })\n     starting = false\n-    var compileReqWatcher = filewatcher({ forcePolling: opts.poll });\n+    var compileReqWatcher = filewatcher({ forcePolling: opts.poll })\n     var currentCompilePath\n-    fs.writeFileSync(compiler.getCompileReqFilePath(), \'\');\n-    compileReqWatcher.add(compiler.getCompileReqFilePath());\n-    compileReqWatcher.on(\'change\', function (file) {\n-      fs.readFile(file, \'utf-8\', function (err, data) {\n+    fs.writeFileSync(compiler.getCompileReqFilePath(), \'\')\n+    compileReqWatcher.add(compiler.getCompileReqFilePath())\n+    compileReqWatcher.on(\'change\', function(file) {\n+      fs.readFile(file, \'utf-8\', function(err, data) {\n         if (err) {\n           log.error(\'Error reading compile request file\', err)\n           return\n@@ -103,70 +109,71 @@ module.exports = function (script, scriptArgs, nodeArgs, opts) {\n         }\n       })\n     })\n-    child.on(\'message\', function (message) {\n-      if (!message.compiledPath || currentCompilePath === message.compiledPath) return\n+    child.on(\'message\', function(message) {\n+      if (!message.compiledPath || currentCompilePath === message.compiledPath)\n+        return\n       currentCompilePath = message.compiledPath\n       compiler.compile(message)\n-    });\n+    })\n \n-    child.on(\'exit\', function (code) {\n+    child.on(\'exit\', function(code) {\n       log.debug(\'Child exited with code %s\', code)\n       if (!child) return\n-      if (!child.respawn) process.exit(code);\n-      child = undefined;\n-    });\n+      if (!child.respawn) process.exit(code)\n+      child = undefined\n+    })\n \n     if (cfg.respawn) {\n-      child.respawn = true;\n+      child.respawn = true\n     }\n \n-\n     if (compiler.tsConfigPath) {\n-      watcher.add(compiler.tsConfigPath);\n+      watcher.add(compiler.tsConfigPath)\n     }\n \n-\n-    // Listen for `required` messages and watch the required file.        \n-    ipc.on(child, \'required\', function (m) {\n-      var isIgnored = cfg.ignore.some(isPrefixOf(m.required)) || cfg.ignore.some(isRegExpMatch(m.required));\n+    // Listen for `required` messages and watch the required file.\n+    ipc.on(child, \'required\', function(m) {\n+      var isIgnored =\n+        cfg.ignore.some(isPrefixOf(m.required)) ||\n+        cfg.ignore.some(isRegExpMatch(m.required))\n \n       if (!isIgnored && (cfg.deps === -1 || getLevel(m.required) <= cfg.deps)) {\n-        watcher.add(m.required);\n+        watcher.add(m.required)\n       }\n-    });\n+    })\n \n     // Upon errors, display a notification and tell the child to exit.\n-    ipc.on(child, \'error\', function (m) {\n-      notify(m.error, m.message, \'error\');\n-      stop(m.willTerminate);\n-    });\n+    ipc.on(child, \'error\', function(m) {\n+      notify(m.error, m.message, \'error\')\n+      stop(m.willTerminate)\n+    })\n     compiler.writeReadyFile()\n   }\n \n   function stop(willTerminate) {\n     if (!child || child.stopping) {\n       return\n-    };\n+    }\n     child.stopping = true\n-    child.respawn = true;\n+    child.respawn = true\n     if (child.connected === undefined || child.connected === true) {\n       log.debug(\'Disconnecting from child\')\n-      child.disconnect();\n+      child.disconnect()\n       if (!willTerminate) {\n         log.debug(\'Sending SIGTERM kill to child\')\n-        child.kill(\'SIGTERM\');\n+        child.kill(\'SIGTERM\')\n       }\n     }\n   }\n \n   // Relay SIGTERM\n-  process.on(\'SIGTERM\', function () {\n-    if (child) child.kill(\'SIGTERM\');\n-    process.exit(0);\n-  });\n+  process.on(\'SIGTERM\', function() {\n+    if (child) child.kill(\'SIGTERM\')\n+    process.exit(0)\n+  })\n \n-  start();\n-};\n+  start()\n+}\n \n /**\n  * Returns the nesting-level of the given module.\n@@ -174,8 +181,8 @@ module.exports = function (script, scriptArgs, nodeArgs, opts) {\n  * a positive integer otherwise.\n  */\n function getLevel(mod) {\n-  var p = getPrefix(mod);\n-  return p.split(\'node_modules\').length - 1;\n+  var p = getPrefix(mod)\n+  return p.split(\'node_modules\').length - 1\n }\n \n /**\n@@ -183,19 +190,19 @@ function getLevel(mod) {\n  * empty string if the path does not contain a node_modules dir.\n  */\n function getPrefix(mod) {\n-  var n = \'node_modules\';\n-  var i = mod.lastIndexOf(n);\n-  return ~i ? mod.slice(0, i + n.length) : \'\';\n+  var n = \'node_modules\'\n+  var i = mod.lastIndexOf(n)\n+  return ~i ? mod.slice(0, i + n.length) : \'\'\n }\n \n function isPrefixOf(value) {\n-  return function (prefix) {\n-    return value.indexOf(prefix) === 0;\n-  };\n+  return function(prefix) {\n+    return value.indexOf(prefix) === 0\n+  }\n }\n \n function isRegExpMatch(value) {\n-  return function (regExp) {\n-    return (new RegExp(regExp)).test(value);\n-  };\n+  return function(regExp) {\n+    return new RegExp(regExp).test(value)\n+  }\n }\ndiff --git a/package.json b/package.json\nindex 5713f7e..fd46d1e 100644\n--- a/package.json\n+++ b/package.json\n@@ -28,6 +28,10 @@\n     "icons",\n     "lib"\n   ],\n+  "prettier": {\n+    "singleQuote": true,\n+    "semi": false\n+  },\n   "preferGlobal": true,\n   "engines": {\n     "node": ">=0.8.0"\n@@ -35,7 +39,7 @@\n   "scripts": {\n     "ts-node-dev": "node ./bin/ts-node-dev",\n     "test-node-dev": "tap test/*.js",\n-    "test": "node ./bin/ts-node-dev -r tsconfig-paths/register -r ./test/ts/add-require.js -r ./test/ts/add-require-2.js -O \\"{\\\\\\"module\\\\\\": \\\\\\"commonjs\\\\\\"}\\" --respawn --ignore-watch \'lib\' --ignore-watch bin --prefer-ts --debug --cache-directory .ts-node --inspect -- test/ts/test-script test-arg --fd",\n+    "test": "node ./bin/ts-node-dev -r tsconfig-paths/register -r ./test/ts/add-require.js -r ./test/ts/add-require-2.js -O \\"{\\\\\\"module\\\\\\": \\\\\\"commonjs\\\\\\"}\\" --preserve-symlinks --respawn --ignore-watch \'lib\' --ignore-watch bin --prefer-ts --debug --cache-directory .ts-node --inspect -- test/ts/test-script test-arg --fd",\n     "test-docker": "docker run --rm -v ${PWD}:/app mhart/alpine-node:8.7.0 sh -c \'cd app && node ./bin/ts-node-dev --cache-directory .ts-node test/ts/big\'"\n   },\n   "dependencies": {\ndiff --git a/test/ts/dep-interface.ts b/test/ts/dep-interface.ts\nnew file mode 100644\nindex 0000000..cda7e23\n--- /dev/null\n+++ b/test/ts/dep-interface.ts\n@@ -0,0 +1,3 @@\n+export interface A {\n+  //a: string\n+}\ndiff --git a/test/ts/test-script.ts b/test/ts/test-script.ts\nindex 3f0fe34..6520803 100644\n--- a/test/ts/test-script.ts\n+++ b/test/ts/test-script.ts\n@@ -1,6 +1,10 @@\n-import {fn} from \'./dep\'\n-\n+import { fn } from \'./dep\'\n+import { A } from \'./dep-interface\'\n const str: string = process.argv[2]\n+const obj: A = {\n+  //a: \'1\'\n+}\n+\n console.log(\'test\', str)\n \n //fn()\n', 'commit_subject': 'add notice about --transpileOnly', 'repo_name': 'whitecolor/ts-node-dev', 'committer': {'name': 'A O', 'email': '910db80b1a33a459e80c925d0378a6a7e2118dda@gmail.com', 'time_sec': '1544448236', 'tz_offset': '300', 'date': {'seconds': '1544448236'}}, 'commit_tree': '09c7f51e379fe8692ec9ecc5809aaf3a66a25bca', 'commit_message': 'add notice about --transpileOnly\n', 'language_name': 'TypeScript', 'license': 'mit', 'hunks': '@@ -0,0 +1,3 @@\n+export interface A {\n+  //a: string\n+}\n', 'addition_count': 3, 'deletion_count': 0, 'src_file': '/dev/null', 'tgt_file': 'b/test/ts/dep-interface.ts', 'file_extension': '.ts', 'before_file': 'ADDFILE', 'message': 'add notice about --transpileOnly\n', 'author_name': 'A O', 'lang': 'ts'}