TypeScript · Interop Constraints

verbatimModuleSyntax

Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.

Syntax
"verbatimModuleSyntax": true

Example

Example
{
  "compilerOptions": {
    "verbatimModuleSyntax": true
  }
}

More in this group

allowSyntheticDefaultImports erasableSyntaxOnly esModuleInterop forceConsistentCasingInFileNames isolatedDeclarations isolatedModules preserveSymlinks

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course