summaryrefslogtreecommitdiff
path: root/docs/getting_started/typescript.md
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2020-09-13 15:17:25 +0200
committerGitHub <noreply@github.com>2020-09-13 15:17:25 +0200
commitf06724f2388180c1d73eb0cc989f3499d84eb879 (patch)
treee1b2df4c22cae0d739d03f8e86aae6fe237a6fec /docs/getting_started/typescript.md
parent755cfa98ebf4e3bd96e432d6a0b761aeb2e3c818 (diff)
docs: manual updates for 1.4 features and changes (#7440)
Diffstat (limited to 'docs/getting_started/typescript.md')
-rw-r--r--docs/getting_started/typescript.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/getting_started/typescript.md b/docs/getting_started/typescript.md
index a72fd3689..6813206e0 100644
--- a/docs/getting_started/typescript.md
+++ b/docs/getting_started/typescript.md
@@ -16,9 +16,9 @@ import { queue } from "./collections.ts";
### `--no-check` option
-When using `deno run`, `deno test`, `deno cache`, `deno info`, or `deno bundle`
-you can specify the `--no-check` flag to disable TypeScript type checking. This
-can significantly reduce the time that program startup takes. This can be very
+When using `deno run`, `deno test`, `deno cache`, or `deno bundle` you can
+specify the `--no-check` flag to disable TypeScript type checking. This can
+significantly reduce the time that program startup takes. This can be very
useful when type checking is provided by your editor and you want startup time
to be as fast as possible (for example when restarting the program automatically
with a file watcher).
@@ -31,9 +31,11 @@ To export a type in a different file use
`export type { AnInterface } from "./mod.ts";`. To import a type use
`import type { AnInterface } from "./mod.ts";`. You can check that you are using
`import type` and `export type` where necessary by setting the `isolatedModules`
-TypeScript compiler option to `true`. You can see an example `tsconfig.json`
-with this option
+TypeScript compiler option to `true`, and the `importsNotUsedAsValues` to
+`error`. You can see an example `tsconfig.json` with this option
[in the standard library](https://github.com/denoland/deno/blob/master/std/tsconfig_test.json).
+These settings will be enabled by default in the future. They are already the
+default in Deno 1.4 or above when using `--unstable`.
Because there is no type information when using `--no-check`, `const enum` is
not supported because it is type-directed. `--no-check` also does not support