diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-07-18 16:30:17 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-18 16:30:17 +1000 |
commit | 44084cd0f925fb9972a0a0aafa1d2197e689f938 (patch) | |
tree | 972a512a5ae7f59013bb9e95019489b79ec5a9f8 /docs/typescript/types.md | |
parent | e0e26b41016c5bf49f358ce7a285192159599306 (diff) |
docs: add npm-Node.js chapter (#11419)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'docs/typescript/types.md')
-rw-r--r-- | docs/typescript/types.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/typescript/types.md b/docs/typescript/types.md index ba5462dc7..02257ff3d 100644 --- a/docs/typescript/types.md +++ b/docs/typescript/types.md @@ -1,12 +1,12 @@ ## Types and Type Declarations -One of the design principles of Deno is no _magical_ resolution. When TypeScript -is type checking a file, it only cares about the types for the file, and the -`tsc` compiler has a lot of logic to try to resolve those types. By default, it -expects _ambiguous_ module specifiers with an extension, and will attempt to -look for the file under the `.ts` specifier, then `.d.ts`, and finally `.js` -(plus a whole other set of logic when the module resolution is set to `"node"`). -Deno deals with explicit specifiers. +One of the design principles of Deno is no non-standard module resolution. When +TypeScript is type checking a file, it only cares about the types for the file, +and the `tsc` compiler has a lot of logic to try to resolve those types. By +default, it expects _ambiguous_ module specifiers with an extension, and will +attempt to look for the file under the `.ts` specifier, then `.d.ts`, and +finally `.js` (plus a whole other set of logic when the module resolution is set +to `"node"`). Deno deals with explicit specifiers. This can cause a couple problems though. For example, let's say I want to consume a TypeScript file that has already been transpiled to JavaScript along |