| title | Performance |
|---|
These tricks will make ts-node faster.
It is often better to use tsc --noEmit to typecheck as part of your tests or linting. In these cases, ts-node can skip typechecking.
- Enable swc
- This is by far the fastest option
- Enable
transpileOnlyto skip typechecking without swc
- Avoid dynamic
require()which may trigger repeated typechecking; preferimport - 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
typesarray to avoid loading unnecessary@types