From 44084cd0f925fb9972a0a0aafa1d2197e689f938 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Sun, 18 Jul 2021 16:30:17 +1000 Subject: docs: add npm-Node.js chapter (#11419) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- docs/typescript/types.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/typescript/types.md') 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 -- cgit v1.2.3