doc: fix grammar and phrasing in typescript.md

Fix grammatical issues and heading phrasing in `doc/api/typescript.md`:
- Correct subject-verb agreement ("files that contains" -> "files that
  contain").
- Add missing indefinite article ("result in an ... error").
- Change heading from "Paths aliases" to "Path aliases" to match
  standard TypeScript terminology.
- Clarify verb parallelism ("won't be transformed and will therefore
  produce an error").

Signed-off-by: Ravi Arnan <raviarnankeren@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66977
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
This commit is contained in:
Ravi Arnan Irianto authored and GitHub committed 2026-10-26 07:56:41 +00:00
1 parent 3983092f63
commit ba3c34a93a
1 file changed
+4 -4
+4 -4
View File
@@ -76,7 +76,7 @@ changes:
description: Type stripping is now stable.
-->
By default Node.js will execute TypeScript files that contains only
By default Node.js will execute TypeScript files that contain only
erasable TypeScript syntax.
Node.js will replace TypeScript syntax with whitespace,
and no type checking is performed.
@@ -164,7 +164,7 @@ namespace TypeOnly {
}
```
This will result in [`ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX`][] error:
This will result in an [`ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX`][] error:
```ts
// This namespace is exporting a value
@@ -231,9 +231,9 @@ is highly discouraged.
Stripping types inside `node_modules` is intended only
for local development.
### Paths aliases
### Path aliases
[`tsconfig` "paths"][] won't be transformed and therefore produce an error. The closest
[`tsconfig` "paths"][] won't be transformed and will therefore produce an error. The closest
feature available is [subpath imports][] with the limitation that they need to start
with `#`.