Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cbe09b5

Browse filesBrowse files
Ceres6aduh95
authored andcommitted
doc: add path aliases typescript doc
PR-URL: #55766 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
1 parent 89aa838 commit cbe09b5
Copy full SHA for cbe09b5

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/typescript.md‎

Copy file name to clipboardExpand all lines: doc/api/typescript.md
+8Lines changed: 8 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,22 @@ To discourage package authors from publishing packages written in TypeScript,
172172
Node.js will by default refuse to handle TypeScript files inside folders under
173173
a `node_modules` path.
174174

175+
### Paths aliases
176+
177+
[`tsconfig` "paths"][] won't be transformed and therefore produce an error. The closest
178+
feature available is [subpath imports][] with the limitation that they need to start
179+
with `#`.
180+
175181
[CommonJS]: modules.md
176182
[ES Modules]: esm.md
177183
[Full TypeScript support]: #full-typescript-support
178184
[`--experimental-strip-types`]: cli.md#--experimental-strip-types
179185
[`--experimental-transform-types`]: cli.md#--experimental-transform-types
186+
[`tsconfig` "paths"]: https://www.typescriptlang.org/tsconfig/#paths
180187
[`tsx`]: https://tsx.is/
181188
[`verbatimModuleSyntax`]: https://www.typescriptlang.org/tsconfig/#verbatimModuleSyntax
182189
[file extensions are mandatory]: esm.md#mandatory-file-extensions
183190
[full support]: #full-typescript-support
191+
[subpath imports]: packages.md#subpath-imports
184192
[the same way as `.js` files.]: packages.md#determining-module-system
185193
[type stripping]: #type-stripping

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.