Skip to content

Commit 3333005

Browse files
authored
Update performance.md (#1837)
1 parent 32d07e2 commit 3333005

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

website/docs/performance.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ These tricks will make ts-node faster.
66

77
## Skip typechecking
88

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:
1012

1113
* Enable [swc](./swc.md)
1214
* This is by far the fastest option
1315
* Enable [`transpileOnly`](./options.md#transpileonly) to skip typechecking without swc
1416

1517
## With typechecking
1618

19+
If you absolutely must use ts-node for typechecking:
20+
1721
* Avoid dynamic `require()` which may trigger repeated typechecking; prefer `import`
1822
* Try with and without `--files`; one may be faster depending on your project
1923
* Check `tsc --showConfig`; make sure all executed files are included

0 commit comments

Comments
 (0)