Skip to content

Commit f2325b1

Browse files
authored
Fix incorrect link to issue (#3181)
1 parent a60c8bc commit f2325b1

File tree

1 file changed

+1
-1
lines changed
  • packages/documentation/copy/en/modules-reference

1 file changed

+1
-1
lines changed

packages/documentation/copy/en/modules-reference/Reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ The detected module format of input `.ts`/`.tsx`/`.mts`/`.cts` files determines
221221

222222
- **When an ES module references a CommonJS module:**
223223
- The `module.exports` of the CommonJS module is available as a default import to the ES module.
224-
- Properties (other than `default`) of the CommonJS module’s `module.exports` may or may not be available as named imports to the ES module. Node.js attempts to make them available via [static analysis](https://github.com/nodejs/cjs-module-lexer). TypeScript cannot know from a declaration file whether that static analysis will succeed, and optimistically assumes it will. This limits TypeScript’s ability to catch named imports that may crash at runtime. See [#54018](https://github.com/nodejs/cjs-module-lexer) for more details.
224+
- Properties (other than `default`) of the CommonJS module’s `module.exports` may or may not be available as named imports to the ES module. Node.js attempts to make them available via [static analysis](https://github.com/nodejs/cjs-module-lexer). TypeScript cannot know from a declaration file whether that static analysis will succeed, and optimistically assumes it will. This limits TypeScript’s ability to catch named imports that may crash at runtime. See [#54018](https://github.com/microsoft/TypeScript/issues/54018) for more details.
225225
- **When a CommonJS module references an ES module:**
226226
- `require` cannot reference an ES module. For TypeScript, this includes `import` statements in files that are [detected](#module-format-detection) to be CommonJS modules, since those `import` statements will be transformed to `require` calls in the emitted JavaScript.
227227
- A dynamic `import()` call may be used to import an ES module. It returns a Promise of the module’s Module Namespace Object (what you’d get from `import * as ns from "./module.js"` from another ES module).

0 commit comments

Comments
 (0)