TypeScript · Middle · Question 45 of 75

What does the isolatedModules flag do?

Explanation

Babel, SWC and esbuild compile files independently and don't see types from other modules. isolatedModules warns about code they can't handle correctly: re-exporting a type without export type, accessing a const enum from another file, and so on.

Further reading

Problem with a question

TypeScript · Middle · question 45

Test yourself

Take the TypeScript · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz