Skip to content

Commit e9f97da

Browse files
authored
Merge pull request #2374 from myogh/replace-await-with-import
Add `import` in the non-module description
2 parents 501e62c + 9da30b1 commit e9f97da

File tree

1 file changed

+2
-1
lines changed
  • packages/documentation/copy/en/handbook-v2

1 file changed

+2
-1
lines changed

Diff for: packages/documentation/copy/en/handbook-v2/Modules.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ Conversely, to consume a variable, function, class, interface, etc. exported fro
2525
## Non-modules
2626

2727
Before we start, it's important to understand what TypeScript considers a module.
28-
The JavaScript specification declares that any JavaScript files without an `export` or top-level `await` should be considered a script and not a module.
28+
The JavaScript specification declares that any JavaScript files without an `import` declaration, `export`, or top-level `await` should be considered a script and not a module.
29+
2930

3031
Inside a script file variables and types are declared to be in the shared global scope, and it's assumed that you'll either use the [`outFile`](/tsconfig#outFile) compiler option to join multiple input files into one output file, or use multiple `<script>` tags in your HTML to load these files (in the correct order!).
3132

0 commit comments

Comments
 (0)