How to use the register function from ts-node

Find comprehensive JavaScript ts-node.register code examples handpicked from public code repositorys.

79
80
81
82
83
84
85
86
87
88
  const tsOptions = getTsNodeOptions(tsPath, registeredFile)

  debug('registering project TS with options %o', tsOptions)

  require('tsconfig-paths/register')
  tsnode.register(tsOptions)
} catch (err) {
  debug(`typescript doesn't exist. ts-node setup failed.`)
  debug('error message: %s', err.message)
}
fork icon0
star icon0
watch icon0