mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
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:
1 parent
3983092f63
commit
ba3c34a93a
1 file changed
+4
-4
@@ -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 `#`.
|
||||
|
||||
|
||||
Reference in new issue
Block a user