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: website/docs/performance.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,18 @@ These tricks will make ts-node faster.
6
6
7
7
## Skip typechecking
8
8
9
-
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.
9
+
It is often better to typecheck as part of your tests or linting. You can use `tsc --noEmit` to do this. In these cases, ts-node can skip typechecking making it much faster.
10
+
11
+
To skip typechecking in ts-node, do one of the following:
10
12
11
13
* Enable [swc](./swc.md)
12
14
* This is by far the fastest option
13
15
* Enable [`transpileOnly`](./options.md#transpileonly) to skip typechecking without swc
14
16
15
17
## With typechecking
16
18
19
+
If you absolutely must use ts-node for typechecking:
20
+
17
21
* Avoid dynamic `require()` which may trigger repeated typechecking; prefer `import`
18
22
* Try with and without `--files`; one may be faster depending on your project
19
23
* Check `tsc --showConfig`; make sure all executed files are included
0 commit comments