You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -1057,14 +1057,18 @@ These tricks will make ts-node faster.
1057
1057
1058
1058
## Skip typechecking
1059
1059
1060
-
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.
1060
+
It is often better to typecheck as part of your tests or linting. You can run `tsc --noEmit` to do this. In these cases, ts-node can skip typechecking, making it much faster.
1061
+
1062
+
To skip typechecking in ts-node, do one of the following:
1061
1063
1062
1064
* Enable [swc](#swc)
1063
1065
* This is by far the fastest option
1064
1066
* Enable [`transpileOnly`](#transpileonly) to skip typechecking without swc
1065
1067
1066
1068
## With typechecking
1067
1069
1070
+
If you absolutely must typecheck in ts-node:
1071
+
1068
1072
* Avoid dynamic `require()` which may trigger repeated typechecking; prefer `import`
1069
1073
* Try with and without `--files`; one may be faster depending on your project
1070
1074
* Check `tsc --showConfig`; make sure all executed files are included
0 commit comments