diff options
author | Chris Knight <cknight1234@gmail.com> | 2020-05-26 12:12:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 13:12:07 +0200 |
commit | 9090023c33de7b64ae41425db71c9ab4d5b1237f (patch) | |
tree | 917fa6901391bf4ef12d52d5232b2355bd6ce2b3 /docs/getting_started/typescript.md | |
parent | 4e92ef7dc9e1d223d9f3099b94579c2b17e4ef9e (diff) |
docs: "Getting started" manual updates (#5835)
Diffstat (limited to 'docs/getting_started/typescript.md')
-rw-r--r-- | docs/getting_started/typescript.md | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/docs/getting_started/typescript.md b/docs/getting_started/typescript.md index 197c41482..7689273db 100644 --- a/docs/getting_started/typescript.md +++ b/docs/getting_started/typescript.md @@ -2,12 +2,19 @@ <!-- TODO(lucacasonato): text on 'just import .ts' --> -### Using external type definitions - Deno supports both JavaScript and TypeScript as first class languages at runtime. This means it requires fully qualified module names, including the extension (or a server providing the correct media type). In addition, Deno has -no "magical" module resolution. +no "magical" module resolution. Instead, imported modules are specified as files +(including extensions) or fully qualified URL imports. Typescript modules can be +directly imported. E.g. + +``` +import { Response } from "https://deno.land/std@0.53.0/http/server.ts"; +import { queue } from "./collections.ts"; +``` + +### Using external type definitions The out of the box TypeScript compiler though relies on both extension-less modules and the Node.js module resolution logic to apply types to JavaScript @@ -98,7 +105,7 @@ way to support customization a configuration file such as `tsconfig.json` might be provided to Deno on program execution. You need to explicitly tell Deno where to look for this configuration by setting -the `-c` argument when executing your application. +the `-c` (or `--config`) argument when executing your application. ```shell deno run -c tsconfig.json mod.ts |