TypeScript 6.0 Enforces Explicit Import Syntax, Breaking Ambiguous Codebases

TypeScript 6.0 introduces strict enforcement of the verbatimModuleSyntax flag, requiring developers to explicitly declare every import and export statement as either a type or a runtime value. Codebases that compiled cleanly under TypeScript 5.x can now throw hundreds of errors, as the compiler no longer guesses which imports should be elided during emit. Mixed imports combining types and runtime values in a single statement must be split into separate lines, and re-exports of type-only modules require the export type syntax. While the migration can take days for large projects, the change improves build performance by an estimated 15–30% by preventing bundlers from parsing unnecessary type imports. The core issue is not the strictness of the new rule, but that developers previously wrote ambiguous imports because earlier compiler versions silently accepted them.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in