summaryrefslogtreecommitdiff
path: root/docs/typescript/faqs.md
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-06-09 11:52:27 +1000
committerGitHub <noreply@github.com>2021-06-09 11:52:27 +1000
commitc84c747ea491bd42f11323e1a0cc54900e1146c0 (patch)
tree205fa71e3ff05d5f75f1c15ef35da869e8f48fb5 /docs/typescript/faqs.md
parent6b826033a4d439cf9475723f0f21ede26e283208 (diff)
docs: improve TypeScript docs around use of libs (#10889)
Closes #10881
Diffstat (limited to 'docs/typescript/faqs.md')
-rw-r--r--docs/typescript/faqs.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/typescript/faqs.md b/docs/typescript/faqs.md
index 8ca9a7bff..b661cc149 100644
--- a/docs/typescript/faqs.md
+++ b/docs/typescript/faqs.md
@@ -52,6 +52,13 @@ that you control. You can also replace whole dependencies, using
dependency of a dependency isn't being maintained or has some sort of breaking
change you want to bypass while waiting for it to be updated.
+### How do I write code that works in Deno and a browser, but still type checks?
+
+You can do this by using a `tsconfig.json` file with the `--config` option on
+the command line and adjusting the `"lib"` option in the `"compilerOptions"` in
+the file. For more information see
+[Targeting Deno and the Browser](./configuration#targeting-deno-and-the-browser).
+
### Why are you forcing me to use isolated modules, why can't I use const enums with Deno, why do I need to do export type?
As of Deno 1.5 we defaulted to _isolatedModules_ to `true` and in Deno 1.6 we