Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/documentation/copy/en/reference/Modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,12 @@ import { APIResponseType } from "./api";

// Explicitly use import type
import type { APIResponseType } from "./api";

// Explicitly pull out a value (getResponse) and a type (APIResponseType)
import { getResponse, type APIResponseType} from "./api";
```

`import type` is always guaranteed to be removed from your JavaScript, and tools like Babel can make better assumptions about your code via the [`isolatedModules`](/tsconfig#isolatedModules) compiler flag.
Any explicitly marked `type` import is guaranteed to be removed from your JavaScript, and tools like Babel can make better assumptions about your code via the [`isolatedModules`](/tsconfig#isolatedModules) compiler flag.
You can read more in the [3.8 release notes](https://devblogs.microsoft.com/typescript/announcing-typescript-3-8-beta/#type-only-imports-exports).

## Default exports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ oneline: "Specify how TypeScript looks up a file from a given module specifier."
Specify the module resolution strategy:

- `'node'` for Node.js' CommonJS implementation
- `'node12'` or `'nodenext'` for Node.js' ECMAScript Module Support [from TypeScript 4.5 onwards](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/)
- `'node16'` or `'nodenext'` for Node.js' ECMAScript Module Support [from TypeScript 4.7 onwards](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#esm-nodejs)
- `'classic'` used in TypeScript before the release of 1.6. You probably won't need to use `classic` in modern code

There is a handbook reference page on [Module Resolution](/docs/handbook/module-resolution.html)