How to use ts-node

Comprehensive ts-node code examples:

How to use ts-node.register:

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)
}