Skip to content

Conversation

SyncDocsBot
Copy link
Contributor

合并自 https://github.com/microsoft/TypeScript-Website.git @ 2eeb5d3
下面的文件存在冲突,请处理后合并:

不要 Squash 此 Pull Request!!!

Copy link

vercel bot commented Sep 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
ts-zh-docs Ready Ready Preview Comment Sep 12, 2025 1:27am

Copy link
Contributor

Got false positives?

Make changes to the global settings spellcheck.json in /microsoft/TypeScript-Website.

Make changes to this repo's settings in spellcheck.json.

Typos for Project References.md

Line Typo
44 mplementation files required typechecking the tests again, even though
45 nging just the tests required typechecking the implementation again, eve
50 oking tsc twice incurs more startup time overhead
78 greatly improve the speed of typechecking and compiling, reduce memory
99 heck in certain build outputs or build a project after cloning
101 itigate this, but it has some perf implications. For very large
101 t want to disable this using [disableSourceOfProjectReferenceRedirect option](/tsconfig#disableSour
121 ### tsc -b Commandline
131 ing the files you pass on the commandline - tsc will re-order them if
149 ## MSBuild
151 If you have an msbuild project, you can enable build
157 to your proj file. This will enable automa
161 Some teams have set up msbuild-based workflows wherein tsconfig fi
183 ### Structuring for outFiles

Typos for Theory.md

Line Typo
30 browsers and in Node.js since v12. It uses dedicated import a
60 nded runtime environment—what globals are available, for example. W
60 all the information needed to analyze it:
75 "greetings" module has been analyzed, what piece of that module is
79 ike CommonJS. So runtimes and bundlers, especially those that want t
81 les. Today, some runtimes and bundlers support loading TypeScript fi
81 TypeScript-first runtimes and bundlers](#module-resolution-for-bundl
97 modules in a web browser, the behaviors TypeScript needs to model are
97 module-loading framework like RequireJS) controls what module formats
102 he browser, or CJS in Node.js v11 and earlier, for example. Nod
102 earlier, for example. Node.js v12 and later accepts both CJS an
108 the module system of Node.js v16+, which supports ES modules a
109 the module system of Node.js v18+, which adds support for impo
117 the emitted JavaScript for an all-ESM Node.js project might look id
167 y 2017, and landed in Node.js v12 in 2019. During much of this
167 aging the use of the original CommonJS-inspired import fs = require("fs") s
171 es differ between Node.js and bundlers. Consequently, the configurat
175 JS, it must be written in the CommonJS-inspired TypeScript syntax (`import fs
179 t specification, so runtimes, bundlers, and transpilers have been fr
179 ist. Today, most runtimes and bundlers broadly fall into one of thre
181 1. ESM-only. Some runtimes, like browse
182 em to CommonJS. The way these ESM-transpiled-to-CJS files interacted with hand-wr
182 -to-CJS files interacted with hand-written-CJS files implied a set of permis
182 ome the de facto standard for bundlers and transpilers.
183 3. Node.js. Until Node.js v20.19.0, Com
183 3. Node.js. Until Node.js v20.19.0, CommonJS modules could not l
183 ntly between Node.js and some bundlers.)
187 [^1]: In Node.js v20.19.0 and later, a require of an
243 solution for a wide range of [RequireJS](https://requirejs.org/docs/a
243 n old projects that don’t use RequireJS or another AMD module loader)
244 f Node.js versions older than v12, and sometimes it’s a passabl
244 ble approximation of how most bundlers do module resolution. It supp
244 e specifiers. Because Node.js v12 introduced different module r
244 d model of modern versions of Node.js. It should not be used for new
245 hat module setting. Node.js v12 and later support both ESM an
247 erence.html#bundler): Node.js v12 introduced some new module re
247 ds of package.json—and many bundlers adopted those features withou
299 think in terms of shortcuts: _"./math.mjs" refers to the i
299 or .mts when I write .mjs._ This shortcut is even how the
321 The last row expresses that non-JS files can be typed with the `
321 ule system supports importing non-JS files as JavaScript objects.
325 ### Module resolution for bundlers, TypeScript runtimes, and Nod
341 ut JS file. But what if there is no output JS file? What if yo
344 TypeScript runtime like Node, Deno or Bun.
349 e module resolution host. For bundlers and the Bun runtime, it’s `bu
372 orks both in Node.js and in bundlers.
374 owing code that only works in bundlers to be produced. Likewise, `"m
374 work in other runtimes and in bundlers.

Generated by 🚫 dangerJS against 2eeb5d3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants