Skip to main content

Make it fast

These tricks will make ts-node faster.

Skip typechecking#

It is often better to use tsc --noEmit to typecheck once before your tests run or as a lint step. In these cases, ts-node can skip typechecking.

With typechecking#

  • Avoid dynamic require() which may trigger repeated typechecking; prefer import
  • Try with and without --files; one may be faster depending on your project
  • Check tsc --showConfig; make sure all executed files are included
  • Enable skipLibCheck
  • Set a types array to avoid loading unnecessary @types