Skip to content

Commit b6d2a4e

Browse files
Ceres6ruyadorno
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 a435aff commit b6d2a4e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api/typescript.md

+8
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)